[llvm-commits] CVS: llvm/utils/TableGen/CodeGenRegisters.h CodeGenTarget.cpp RegisterInfoEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Aug 19 12:13:03 PDT 2005
Changes in directory llvm/utils/TableGen:
CodeGenRegisters.h updated: 1.6 -> 1.7
CodeGenTarget.cpp updated: 1.31 -> 1.32
RegisterInfoEmitter.cpp updated: 1.28 -> 1.29
---
Log message:
Split register class "Methods" into MethodProtos and MethodBodies
---
Diffs of the changes: (+13 -6)
CodeGenRegisters.h | 2 +-
CodeGenTarget.cpp | 14 ++++++++++----
RegisterInfoEmitter.cpp | 3 ++-
3 files changed, 13 insertions(+), 6 deletions(-)
Index: llvm/utils/TableGen/CodeGenRegisters.h
diff -u llvm/utils/TableGen/CodeGenRegisters.h:1.6 llvm/utils/TableGen/CodeGenRegisters.h:1.7
--- llvm/utils/TableGen/CodeGenRegisters.h:1.6 Fri Aug 19 13:45:20 2005
+++ llvm/utils/TableGen/CodeGenRegisters.h Fri Aug 19 14:12:51 2005
@@ -36,7 +36,7 @@
std::vector<Record*> Elements;
unsigned SpillSize;
unsigned SpillAlignment;
- std::string MethodDefinitions;
+ std::string MethodProtos, MethodBodies;
const std::string &getName() const;
Index: llvm/utils/TableGen/CodeGenTarget.cpp
diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.31 llvm/utils/TableGen/CodeGenTarget.cpp:1.32
--- llvm/utils/TableGen/CodeGenTarget.cpp:1.31 Fri Aug 19 13:45:20 2005
+++ llvm/utils/TableGen/CodeGenTarget.cpp Fri Aug 19 14:12:51 2005
@@ -153,12 +153,18 @@
SpillSize = R->getValueAsInt("Size");
SpillAlignment = R->getValueAsInt("Alignment");
- if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("Methods")))
- MethodDefinitions = CI->getValue();
+ if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("MethodBodies")))
+ MethodBodies = CI->getValue();
else
- throw "Expected 'code' fragment for 'Methods' value in register class '"+
- getName() + "'!";
+ throw "Expected 'code' fragment for 'MethodBodies' value in register "
+ "class '" + getName() + "'!";
+ if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("MethodProtos")))
+ MethodProtos = CI->getValue();
+ else
+ throw "Expected 'code' fragment for 'MethodProtos' value in register "
+ "class '" + getName() + "'!";
+
ListInit *RegList = R->getValueAsListInit("MemberList");
for (unsigned i = 0, e = RegList->getSize(); i != e; ++i) {
DefInit *RegDef = dynamic_cast<DefInit*>(RegList->getElement(i));
Index: llvm/utils/TableGen/RegisterInfoEmitter.cpp
diff -u llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.28 llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.29
--- llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.28 Fri Aug 19 13:47:59 2005
+++ llvm/utils/TableGen/RegisterInfoEmitter.cpp Fri Aug 19 14:12:51 2005
@@ -126,7 +126,8 @@
<< " " << Name << "Class() : TargetRegisterClass("
<< RC.SpillSize/8 << ", " << RC.SpillAlignment/8 << ", " << Name << ", "
<< Name << " + " << RC.Elements.size() << ") {}\n"
- << RC.MethodDefinitions << " };\n\n";
+ << RC.MethodProtos << " };\n";
+ OS << RC.MethodBodies << "\n";
}
OS << "} // end anonymous namespace\n\n";
More information about the llvm-commits
mailing list