make the new isel's interpreter loop call the generated
authorChris Lattner <sabre@nondot.org>
Wed, 17 Feb 2010 00:41:34 +0000 (00:41 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 17 Feb 2010 00:41:34 +0000 (00:41 +0000)
CheckComplexPattern function.  Though it is logically const,
I don't have the fortitude to clean up all the targets now,
and it not being const doesn't block anything.

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

include/llvm/CodeGen/DAGISelHeader.h
include/llvm/CodeGen/SelectionDAGISel.h

index f4514b07fddf3ee70ec4e1a014585a6e458c1d38..f3eccf0a5eacbc224411f0d4e3a5f7c7511d2dcf 100644 (file)
@@ -319,13 +319,11 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
     case OPC_CheckPredicate:
       if (!CheckNodePredicate(N.getNode(), MatcherTable[MatcherIndex++])) break;
       continue;
-    case OPC_CheckComplexPat: {
-      unsigned PatNo = MatcherTable[MatcherIndex++];
-      (void)PatNo;
-      // FIXME: CHECK IT.
+    case OPC_CheckComplexPat:
+      if (!CheckComplexPattern(NodeToMatch, N, 
+                               MatcherTable[MatcherIndex++], RecordedNodes))
+        break;
       continue;
-    }
-        
     case OPC_CheckOpcode:
       if (N->getOpcode() != MatcherTable[MatcherIndex++]) break;
       continue;
index 0be91b414d0b5791f9b43dada9c9c2190f02cf15..1b9c26860500c87a33a65543b4fdc84643411eb9 100644 (file)
@@ -131,6 +131,12 @@ protected:
     return 0;
   }
   
+  virtual bool CheckComplexPattern(SDNode *Root, SDValue N, unsigned PatternNo,
+                                   SmallVectorImpl<SDValue> &Result) {
+    assert(0 && "Tblgen should generate the implementation of this!");
+    return false;
+  }
+  
   // Calls to these functions are generated by tblgen.
   SDNode *Select_INLINEASM(SDNode *N);
   SDNode *Select_UNDEF(SDNode *N);