eliminate the old InstFormatName which is always "AsmString",

simplify CodeGenInstruction. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117891 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner committed 2010-11-01 02:15:23 +00:00
1 parent 4a74ee7203
commit f780811456
5 files changed
+6 -15

No files matched your search

+1 -1
View File
@@ -945,7 +945,7 @@ void AsmMatcherInfo::BuildInfo() {
Instructions.push_back(II.take());
}
// Build info for the register classes.
BuildRegisterClasses(SingletonRegisters);
+2 -2
View File
@@ -95,9 +95,9 @@ static void ParseConstraints(const std::string &CStr, CodeGenInstruction *I) {
}
}
CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
: TheDef(R), AsmString(AsmStr) {
CodeGenInstruction::CodeGenInstruction(Record *R) : TheDef(R) {
Namespace = R->getValueAsString("Namespace");
AsmString = R->getValueAsString("AsmString");
isReturn = R->getValueAsBit("isReturn");
isBranch = R->getValueAsBit("isBranch");
+1 -1
View File
@@ -185,7 +185,7 @@ namespace llvm {
return false;
}
CodeGenInstruction(Record *R, const std::string &AsmStr);
CodeGenInstruction(Record *R);
/// getOperandNamed - Return the index of the operand with the specified
/// non-empty name. If the instruction does not have an operand with the
+2 -7
View File
@@ -295,13 +295,8 @@ void CodeGenTarget::ReadInstructions() const {
throw std::string("No 'Instruction' subclasses defined!");
// Parse the instructions defined in the .td file.
std::string InstFormatName =
getAsmWriter()->getValueAsString("InstFormatName");
for (unsigned i = 0, e = Insts.size(); i != e; ++i) {
std::string AsmStr = Insts[i]->getValueAsString(InstFormatName);
Instructions[Insts[i]] = new CodeGenInstruction(Insts[i], AsmStr);
}
for (unsigned i = 0, e = Insts.size(); i != e; ++i)
Instructions[Insts[i]] = new CodeGenInstruction(Insts[i]);
}
static const CodeGenInstruction *