Changes in directory llvm/utils/TableGen:
CodeGenTarget.cpp updated: 1.48 -> 1.49 CodeGenTarget.h updated: 1.22 -> 1.23 DAGISelEmitter.cpp updated: 1.86 -> 1.87 --- Log message: * Added an explicit type field to ComplexPattern. * Renamed MatchingNodes to RootNodes. --- Diffs of the changes: (+12 -9) CodeGenTarget.cpp | 8 +++++--- CodeGenTarget.h | 8 +++++--- DAGISelEmitter.cpp | 5 ++--- 3 files changed, 12 insertions(+), 9 deletions(-) Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.48 llvm/utils/TableGen/CodeGenTarget.cpp:1.49 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.48 Wed Dec 7 20:00:36 2005 +++ llvm/utils/TableGen/CodeGenTarget.cpp Wed Dec 7 20:14:08 2005 @@ -335,7 +335,9 @@ // ComplexPattern implementation // ComplexPattern::ComplexPattern(Record *R) { - NumOperands = R->getValueAsInt("NumOperands"); - SelectFunc = R->getValueAsString("SelectFunc"); - MatchingNodes = R->getValueAsListOfDefs("MatchingNodes"); + Ty = ::getValueType(R->getValueAsDef("Ty")); + NumOperands = R->getValueAsInt("NumOperands"); + SelectFunc = R->getValueAsString("SelectFunc"); + RootNodes = R->getValueAsListOfDefs("RootNodes"); } + Index: llvm/utils/TableGen/CodeGenTarget.h diff -u llvm/utils/TableGen/CodeGenTarget.h:1.22 llvm/utils/TableGen/CodeGenTarget.h:1.23 --- llvm/utils/TableGen/CodeGenTarget.h:1.22 Wed Dec 7 20:00:36 2005 +++ llvm/utils/TableGen/CodeGenTarget.h Wed Dec 7 20:14:08 2005 @@ -160,17 +160,19 @@ /// ComplexPattern - ComplexPattern info, corresponding to the ComplexPattern /// tablegen class in TargetSelectionDAG.td class ComplexPattern { + MVT::ValueType Ty; unsigned NumOperands; std::string SelectFunc; - std::vector<Record*> MatchingNodes; + std::vector<Record*> RootNodes; public: ComplexPattern() : NumOperands(0) {}; ComplexPattern(Record *R); + MVT::ValueType getValueType() const { return Ty; } unsigned getNumOperands() const { return NumOperands; } const std::string &getSelectFunc() const { return SelectFunc; } - const std::vector<Record*> &getMatchingNodes() const { - return MatchingNodes; + const std::vector<Record*> &getRootNodes() const { + return RootNodes; } }; Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.86 llvm/utils/TableGen/DAGISelEmitter.cpp:1.87 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.86 Wed Dec 7 20:00:36 2005 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Dec 7 20:14:08 2005 @@ -478,8 +478,7 @@ // Using a VTSDNode or CondCodeSDNode. return MVT::Other; } else if (R->isSubClassOf("ComplexPattern")) { - const CodeGenTarget &T = TP.getDAGISelEmitter().getTargetInfo(); - return T.getPointerType(); + return TP.getDAGISelEmitter().getComplexPattern(R).getValueType(); } else if (R->getName() == "node") { // Placeholder. return MVT::isUnknown; @@ -2256,7 +2255,7 @@ dynamic_cast<IntInit*>(Node->getLeafValue())) { PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]); } else if ((CP = NodeGetComplexPattern(Node, *this))) { - std::vector<Record*> OpNodes = CP->getMatchingNodes(); + std::vector<Record*> OpNodes = CP->getRootNodes(); for (unsigned j = 0, e = OpNodes.size(); j != e; j++) { PatternsByOpcode[OpNodes[j]].insert(PatternsByOpcode[OpNodes[j]].begin(), &PatternsToMatch[i]); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits