[llvm-branch-commits] [llvm-branch] r119225 - in /llvm/branches/Apple/whitney: include/llvm/Target/Target.td utils/TableGen/AsmMatcherEmitter.cpp utils/TableGen/CodeGenInstruction.cpp utils/TableGen/CodeGenInstruction.h utils/TableGen/CodeGenTarget.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 15 13:44:31 PST 2010
Author: ddunbar
Date: Mon Nov 15 15:44:31 2010
New Revision: 119225
URL: http://llvm.org/viewvc/llvm-project?rev=119225&view=rev
Log:
Merge r117891:
--
Author: Chris Lattner <clattner at apple.com>
Date: Mon Nov 1 02:15:23 2010 +0000
eliminate the old InstFormatName which is always "AsmString",
simplify CodeGenInstruction. No functionality change.
Modified:
llvm/branches/Apple/whitney/include/llvm/Target/Target.td
llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.cpp
llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.h
llvm/branches/Apple/whitney/utils/TableGen/CodeGenTarget.cpp
Modified: llvm/branches/Apple/whitney/include/llvm/Target/Target.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/include/llvm/Target/Target.td?rev=119225&r1=119224&r2=119225&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/include/llvm/Target/Target.td (original)
+++ llvm/branches/Apple/whitney/include/llvm/Target/Target.td Mon Nov 15 15:44:31 2010
@@ -593,10 +593,6 @@
// name.
string AsmWriterClassName = "AsmPrinter";
- // InstFormatName - AsmWriters can specify the name of the format string to
- // print instructions with.
- string InstFormatName = "AsmString";
-
// Variant - AsmWriters can be of multiple different variants. Variants are
// used to support targets that need to emit assembly code in ways that are
// mostly the same for different targets, but have minor differences in
Modified: llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp?rev=119225&r1=119224&r2=119225&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp Mon Nov 15 15:44:31 2010
@@ -945,7 +945,7 @@
Instructions.push_back(II.take());
}
-
+
// Build info for the register classes.
BuildRegisterClasses(SingletonRegisters);
Modified: llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.cpp?rev=119225&r1=119224&r2=119225&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.cpp (original)
+++ llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.cpp Mon Nov 15 15:44:31 2010
@@ -95,9 +95,9 @@
}
}
-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");
Modified: llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.h?rev=119225&r1=119224&r2=119225&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.h (original)
+++ llvm/branches/Apple/whitney/utils/TableGen/CodeGenInstruction.h Mon Nov 15 15:44:31 2010
@@ -185,7 +185,7 @@
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
Modified: llvm/branches/Apple/whitney/utils/TableGen/CodeGenTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/utils/TableGen/CodeGenTarget.cpp?rev=119225&r1=119224&r2=119225&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/utils/TableGen/CodeGenTarget.cpp (original)
+++ llvm/branches/Apple/whitney/utils/TableGen/CodeGenTarget.cpp Mon Nov 15 15:44:31 2010
@@ -295,13 +295,8 @@
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 *
More information about the llvm-branch-commits
mailing list