aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-17 00:41:34 +0000
committerChris Lattner <sabre@nondot.org>2010-02-17 00:41:34 +0000
commitbd12fe8b693d90713f69353affdfdaa3bb09c26d (patch)
tree3edbe7cf00c0f78f56b911c16fdbf45e3e8c995f
parent5be6e5990b1da82e31f4236d1b392e52637cbe2e (diff)
downloadexternal_llvm-bd12fe8b693d90713f69353affdfdaa3bb09c26d.zip
external_llvm-bd12fe8b693d90713f69353affdfdaa3bb09c26d.tar.gz
external_llvm-bd12fe8b693d90713f69353affdfdaa3bb09c26d.tar.bz2
make the new isel's interpreter loop call the generated
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
-rw-r--r--include/llvm/CodeGen/DAGISelHeader.h10
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h6
2 files changed, 10 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h
index f4514b0..f3eccf0 100644
--- a/include/llvm/CodeGen/DAGISelHeader.h
+++ b/include/llvm/CodeGen/DAGISelHeader.h
@@ -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;
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 0be91b4..1b9c268 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -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);