From 9625fb062a066a12d9149e9f1f561ab1f6906ee9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 17 Feb 2010 00:41:34 +0000 Subject: [PATCH] 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. llvm-svn: 96426 --- include/llvm/CodeGen/DAGISelHeader.h | 10 ++++------ include/llvm/CodeGen/SelectionDAGISel.h | 6 ++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h index f4514b07fdd..f3eccf0a5ea 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 0be91b414d0..1b9c2686050 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 &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);