add fields to the .td files unconditionally, simplifying tblgen a bit.

Switch the ARM backend to use 'let' instead of 'set' with this change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-11-15 05:19:05 +00:00
parent 513dbf1af0
commit 2ac190238e
10 changed files with 38 additions and 36 deletions

View File

@@ -230,9 +230,9 @@ void CodeEmitterGen::run(raw_ostream &o) {
}
}
if (R->getValue("PostEncoderMethod"))
Case += " Value = " +
R->getValueAsString("PostEncoderMethod") + "(MI, Value);\n";
std::string PostEmitter = R->getValueAsString("PostEncoderMethod");
if (!PostEmitter.empty())
Case += " Value = " + PostEmitter + "(MI, Value);\n";
std::vector<std::string> &InstList = CaseMap[Case];
InstList.push_back(InstName);

View File

@@ -71,8 +71,7 @@ CGIOperandList::CGIOperandList(Record *R) : TheDef(R) {
if (Rec->isSubClassOf("Operand")) {
PrintMethod = Rec->getValueAsString("PrintMethod");
// If there is an explicit encoder method, use it.
if (Rec->getValue("EncoderMethod"))
EncoderMethod = Rec->getValueAsString("EncoderMethod");
EncoderMethod = Rec->getValueAsString("EncoderMethod");
MIOpInfo = Rec->getValueAsDag("MIOperandInfo");
// Verify that MIOpInfo has an 'ops' root value.