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 | 76616b303cc3154f11c225e1258c20397a8b16aa (patch) | |
tree | c4d589f4791e5f3c1eff4ae77123c577369808c6 | |
parent | eef4cf189cac1bf9ea25b9898ba209f980a39586 (diff) | |
download | external_llvm-76616b303cc3154f11c225e1258c20397a8b16aa.zip external_llvm-76616b303cc3154f11c225e1258c20397a8b16aa.tar.gz external_llvm-76616b303cc3154f11c225e1258c20397a8b16aa.tar.bz2 |
Recommitting changes after more testing. These appear to cause no problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48222 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 8 | ||||
-rw-r--r-- | utils/TableGen/CodeGenInstruction.cpp | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 003f108..e5d70cd 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/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/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index 0ee6b41..8b70647 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/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!"; |