diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-21 22:00:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-21 22:00:25 +0000 |
commit | d847bc20b89679279e75412ddc51dc1d299da942 (patch) | |
tree | 7023e7f39def25d2d9ab5228be5388c6bfe859d6 /utils/TableGen | |
parent | 71dc4d96ed39fadcdccf8c578d49a1afdae0c6ba (diff) | |
download | external_llvm-d847bc20b89679279e75412ddc51dc1d299da942.zip external_llvm-d847bc20b89679279e75412ddc51dc1d299da942.tar.gz external_llvm-d847bc20b89679279e75412ddc51dc1d299da942.tar.bz2 |
Rework passing parent pointers into complexpatterns, I forgot
that complex patterns are matched after the entire pattern has
a structural match, therefore the NodeStack isn't in a useful
state when the actual call to the matcher happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/DAGISelMatcherEmitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index 3c669da..caba99b 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -634,7 +634,8 @@ void MatcherTableEmitter::EmitPredicateFunctions(formatted_raw_ostream &OS) { // FIXME: This should be const. if (!ComplexPatterns.empty()) { OS << "bool CheckComplexPattern(SDNode *Root, SDNode *Parent, SDValue N,\n"; - OS << " unsigned PatternNo, SmallVectorImpl<SDValue> &Result) {\n"; + OS << " unsigned PatternNo,\n"; + OS << " SmallVectorImpl<std::pair<SDValue, SDNode*> > &Result) {\n"; OS << " unsigned NextRes = Result.size();\n"; OS << " switch (PatternNo) {\n"; OS << " default: assert(0 && \"Invalid pattern # in table?\");\n"; @@ -662,7 +663,7 @@ void MatcherTableEmitter::EmitPredicateFunctions(formatted_raw_ostream &OS) { OS << "N"; for (unsigned i = 0; i != NumOps; ++i) - OS << ", Result[NextRes+" << i << ']'; + OS << ", Result[NextRes+" << i << "].first"; OS << ");\n"; } OS << " }\n"; |