diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-21 06:03:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-21 06:03:07 +0000 |
commit | 77f2e2724dc488bbf032e87f8f25f333730a0fb5 (patch) | |
tree | a7448610c2bdd7da61f0f95a5d6d0a94b3aa430d /utils/TableGen/DAGISelMatcherGen.cpp | |
parent | f1c6428164f6f5e07cbc88c1c1440efbf29c0d5f (diff) | |
download | llvm-77f2e2724dc488bbf032e87f8f25f333730a0fb5.tar.gz llvm-77f2e2724dc488bbf032e87f8f25f333730a0fb5.tar.bz2 llvm-77f2e2724dc488bbf032e87f8f25f333730a0fb5.tar.xz |
implement the last known missing feature: updating uses of results
of the matched pattern to use the newly created node results. Onto
the "making it actually work" phase!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcherGen.cpp')
-rw-r--r-- | utils/TableGen/DAGISelMatcherGen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp index 693c4ccf8d..b22fa875e0 100644 --- a/utils/TableGen/DAGISelMatcherGen.cpp +++ b/utils/TableGen/DAGISelMatcherGen.cpp @@ -723,8 +723,8 @@ EmitResultInstructionAsOperand(const TreePatternNode *N, // The newly emitted node gets recorded. // FIXME2: This should record all of the results except the (implicit) one. - OutputOps.push_back(NextRecordedOperandNo++); - + if (ResultVTs[0] != MVT::Other) + OutputOps.push_back(NextRecordedOperandNo++); // FIXME2: Kill off all the SelectionDAG::SelectNodeTo and getMachineNode // variants. Call MorphNodeTo instead of SelectNodeTo. @@ -776,11 +776,11 @@ void MatcherGen::EmitResultCode() { // We know that the resulting pattern has exactly one result/ // FIXME2: why? what about something like (set a,b,c, (complexpat)) // FIXME2: Implicit results should be pushed here I guess? - assert(Ops.size() == 1); + assert(Ops.size() <= 1); // FIXME: Handle Ops. // FIXME: Handle (set EAX, (foo)) but not (implicit EFLAGS) - AddMatcherNode(new PatternMarkerMatcherNode(Pattern)); + AddMatcherNode(new CompleteMatchMatcherNode(Ops.data(), Ops.size(), Pattern)); } |