diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-11 22:30:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-11 22:30:51 +0000 |
commit | 7b56ce409fb6eb5f2e885399f26aa77386ef575a (patch) | |
tree | fc9088e56b2783c2d2c3b6e9cb584743b84b405b | |
parent | 0abaaf49fd32eb32abc3117a4bff41fe82d9ec3e (diff) | |
download | external_llvm-7b56ce409fb6eb5f2e885399f26aa77386ef575a.zip external_llvm-7b56ce409fb6eb5f2e885399f26aa77386ef575a.tar.gz external_llvm-7b56ce409fb6eb5f2e885399f26aa77386ef575a.tar.bz2 |
It is not an error if a rule does not match, it's just a failed match!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7761 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | support/tools/TableGen/InstrSelectorEmitter.cpp | 5 | ||||
-rw-r--r-- | utils/TableGen/InstrSelectorEmitter.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/support/tools/TableGen/InstrSelectorEmitter.cpp b/support/tools/TableGen/InstrSelectorEmitter.cpp index 4f6a018..42d3c22 100644 --- a/support/tools/TableGen/InstrSelectorEmitter.cpp +++ b/support/tools/TableGen/InstrSelectorEmitter.cpp @@ -1064,8 +1064,9 @@ void InstrSelectorEmitter::run(std::ostream &OS) { << " return N->getCostFor(" << SlotName << "_Slot);\n\n" << " unsigned Cost;\n" << " switch (N->getNodeType()) {\n" - << " default: assert(0 && \"Unhandled node type for " << SlotName - << "!\");\n"; + << " default: Cost = ~0U >> 1; // Match failed\n" + << " N->setPatternCostFor(" << SlotName << "_Slot, NoMatchPattern, Cost, NumSlots);\n" + << " break;\n"; for (PatternOrganizer::NodesForSlot::iterator J = I->second.begin(), E = I->second.end(); J != E; ++J) diff --git a/utils/TableGen/InstrSelectorEmitter.cpp b/utils/TableGen/InstrSelectorEmitter.cpp index 4f6a018..42d3c22 100644 --- a/utils/TableGen/InstrSelectorEmitter.cpp +++ b/utils/TableGen/InstrSelectorEmitter.cpp @@ -1064,8 +1064,9 @@ void InstrSelectorEmitter::run(std::ostream &OS) { << " return N->getCostFor(" << SlotName << "_Slot);\n\n" << " unsigned Cost;\n" << " switch (N->getNodeType()) {\n" - << " default: assert(0 && \"Unhandled node type for " << SlotName - << "!\");\n"; + << " default: Cost = ~0U >> 1; // Match failed\n" + << " N->setPatternCostFor(" << SlotName << "_Slot, NoMatchPattern, Cost, NumSlots);\n" + << " break;\n"; for (PatternOrganizer::NodesForSlot::iterator J = I->second.begin(), E = I->second.end(); J != E; ++J) |