diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-01 02:15:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-01 02:15:23 +0000 |
commit | f78081145695baa5d0b004e674c4561245b13b52 (patch) | |
tree | f0c8b7bcb3a6f125725963dbd3603f4cc7acfc75 /utils | |
parent | 4a74ee7203d119232d9c6df33946c01611e433f8 (diff) | |
download | external_llvm-f78081145695baa5d0b004e674c4561245b13b52.zip external_llvm-f78081145695baa5d0b004e674c4561245b13b52.tar.gz external_llvm-f78081145695baa5d0b004e674c4561245b13b52.tar.bz2 |
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
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/CodeGenInstruction.cpp | 4 | ||||
-rw-r--r-- | utils/TableGen/CodeGenInstruction.h | 2 | ||||
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 9 |
4 files changed, 6 insertions, 11 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index c047a5d..37a8c8f 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -945,7 +945,7 @@ void AsmMatcherInfo::BuildInfo() { Instructions.push_back(II.take()); } - + // Build info for the register classes. BuildRegisterClasses(SingletonRegisters); diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index f7b45e24..41a27ce 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/utils/TableGen/CodeGenInstruction.cpp @@ -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"); diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h index 93d1ce1..33701ec 100644 --- a/utils/TableGen/CodeGenInstruction.h +++ b/utils/TableGen/CodeGenInstruction.h @@ -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 diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index c9b6fc2..7a1c4f7 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -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 * |