diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2008-03-11 09:33:47 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2008-03-11 09:33:47 +0000 |
commit | a731239c30c76bd1e774b5a462b45db590303d24 (patch) | |
tree | bf9a3efb39045ec5c904023cdf6101bbb86ff92b | |
parent | d54660aeed98c475a79171195dad6937ac9eabe0 (diff) | |
download | bcm5719-llvm-a731239c30c76bd1e774b5a462b45db590303d24.tar.gz bcm5719-llvm-a731239c30c76bd1e774b5a462b45db590303d24.zip |
Recommitting changes after more testing. These appear to cause no problems.
llvm-svn: 48222
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 8 | ||||
-rw-r--r-- | llvm/utils/TableGen/CodeGenInstruction.cpp | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 003f108fa4c..e5d70cd084e 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -872,6 +872,10 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { std::vector<unsigned char> VT; VT.push_back(MVT::iPTR); MadeChange = UpdateNodeType(VT, TP); + } else if (ResultNode->getName() == "unknown") { + std::vector<unsigned char> VT; + VT.push_back(MVT::isUnknown); + MadeChange = UpdateNodeType(VT, TP); } else { assert(ResultNode->isSubClassOf("RegisterClass") && "Operands should be register classes!"); @@ -910,13 +914,15 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { MadeChange |= Child->UpdateNodeType(VT, TP); } else if (OperandNode->getName() == "ptr_rc") { MadeChange |= Child->UpdateNodeType(MVT::iPTR, TP); + } else if (OperandNode->getName() == "unknown") { + MadeChange |= Child->UpdateNodeType(MVT::isUnknown, TP); } else { assert(0 && "Unknown operand type!"); abort(); } MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); } - + if (ChildNo != getNumChildren()) TP.error("Instruction '" + getOperator()->getName() + "' was provided too many operands!"); diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp index 0ee6b41d908..8b706479077 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -163,7 +163,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) isVariadic = true; continue; } else if (!Rec->isSubClassOf("RegisterClass") && - Rec->getName() != "ptr_rc") + Rec->getName() != "ptr_rc" && Rec->getName() != "unknown") throw "Unknown operand class '" + Rec->getName() + "' in instruction '" + R->getName() + "' instruction!"; |