simplify some code now that chain/flag results are not stored in
authorChris Lattner <sabre@nondot.org>
Sun, 28 Feb 2010 23:00:47 +0000 (23:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 28 Feb 2010 23:00:47 +0000 (23:00 +0000)
the vtlist for emitnode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97429 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelMatcher.h
utils/TableGen/DAGISelMatcherEmitter.cpp
utils/TableGen/DAGISelMatcherOpt.cpp

index d9c8b2922124afd63c710d564dd283aed766247b..ea48a0b51e6a502032c74052dcf202d242342569 100644 (file)
@@ -902,15 +902,6 @@ public:
     return VTs[i];
   }
 
-  /// getNumNonChainFlagVTs - Return the number of normal results that this node
-  /// will have, ignoring flag and chain results.
-  unsigned getNumNonChainFlagVTs() const {
-    for (unsigned i = 0, e = getNumVTs(); i != e; ++i)
-      if (VTs[i] == MVT::Flag || VTs[i] == MVT::Other)
-        return i;
-    return getNumVTs();
-  }
-  
   unsigned getNumOperands() const { return Operands.size(); }
   unsigned getOperand(unsigned i) const {
     assert(i < Operands.size());
index 76241c5193ebc78f58ff5f9036f26fb61f1badb9..3f78cdd206b847b0a72717c62e68363425829ae4 100644 (file)
@@ -372,7 +372,7 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx,
     
     // Print the result #'s for EmitNode.
     if (const EmitNodeMatcher *E = dyn_cast<EmitNodeMatcher>(EN)) {
-      if (unsigned NumResults = EN->getNumNonChainFlagVTs()) {
+      if (unsigned NumResults = EN->getNumVTs()) {
         OS.PadToColumn(CommentIndent) << "// Results = ";
         unsigned First = E->getFirstResultSlot();
         for (unsigned i = 0; i != NumResults; ++i)
index 01723d3ec84e2b9fa0829162e59fe895d1a5f0b2..37643c318407e39feaa5b1c63fea733eb5210b8e 100644 (file)
@@ -65,7 +65,9 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr,
       MatcherPtr.reset(MP->takeNext());
       return ContractNodes(MatcherPtr, CGP);
     }
-  
+
+  // FIXME: Handle OPC_MarkFlagResults.
+
   // Turn EmitNode->CompleteMatch into MorphNodeTo if we can.
   if (EmitNodeMatcher *EN = dyn_cast<EmitNodeMatcher>(N))
     if (CompleteMatchMatcher *CM =
@@ -120,8 +122,6 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr,
         return;
       }
 
-      // FIXME: Handle OPC_MarkFlagResults.
-      
       // FIXME2: Kill off all the SelectionDAG::MorphNodeTo and getMachineNode
       // variants.
     }