diff options
Diffstat (limited to 'support/tools/TableGen')
-rw-r--r-- | support/tools/TableGen/InstrSelectorEmitter.cpp | 7 | ||||
-rw-r--r-- | support/tools/TableGen/InstrSelectorEmitter.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/support/tools/TableGen/InstrSelectorEmitter.cpp b/support/tools/TableGen/InstrSelectorEmitter.cpp index 42d3c22..133ed7d 100644 --- a/support/tools/TableGen/InstrSelectorEmitter.cpp +++ b/support/tools/TableGen/InstrSelectorEmitter.cpp @@ -19,6 +19,7 @@ NodeType::ArgResultTypes NodeType::Translate(Record *R) { if (Name == "DNVT_arg0") return Arg0; if (Name == "DNVT_arg1") return Arg1; if (Name == "DNVT_ptr" ) return Ptr; + if (Name == "DNVT_bool") return Bool; throw "Unknown DagNodeValType '" + Name + "'!"; } @@ -275,6 +276,9 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) { AnyUnset |= InferTypes(Child, MadeChange); switch (NT.ArgTypes[i]) { + case NodeType::Bool: + MadeChange |= Child->updateNodeType(MVT::i1, TheRecord->getName()); + break; case NodeType::Arg0: MadeChange |= Child->updateNodeType(N->getChild(0)->getType(), TheRecord->getName()); @@ -300,6 +304,9 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) { case NodeType::Void: MadeChange |= N->updateNodeType(MVT::isVoid, TheRecord->getName()); break; + case NodeType::Bool: + MadeChange |= N->updateNodeType(MVT::i1, TheRecord->getName()); + break; case NodeType::Arg0: MadeChange |= N->updateNodeType(N->getChild(0)->getType(), TheRecord->getName()); diff --git a/support/tools/TableGen/InstrSelectorEmitter.h b/support/tools/TableGen/InstrSelectorEmitter.h index a8ab145..d34c191 100644 --- a/support/tools/TableGen/InstrSelectorEmitter.h +++ b/support/tools/TableGen/InstrSelectorEmitter.h @@ -25,8 +25,7 @@ struct NodeType { Arg0, // Value matches the type of Arg0 Arg1, // Value matches the type of Arg1 Ptr, // Tree node is the type of the target pointer - - // Return types + Bool, // Always bool Void, // Tree node always returns void }; |