diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-01 01:54:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-01 01:54:19 +0000 |
commit | 4d0c931ba7758a98864dc7e968a10df7fed7ab70 (patch) | |
tree | 66620e06a372a92ec561fa805fcfb470dcb2d898 /utils/TableGen/DAGISelEmitter.cpp | |
parent | ccd23cc2a49f02acbcdd50128a9022477f7cb6a4 (diff) |
inline the node transforms and node predicates into the generated
dispatcher method. This eliminates the dependence of the new isel's
generated code on the old isel's predicates, however some random
hand written isel code still uses them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 2ea8bf0336..2854e4f221 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -1933,17 +1933,18 @@ void DAGISelEmitter::run(raw_ostream &OS) { << "// by the instruction selector.\n"; OS << "#include \"llvm/CodeGen/DAGISelHeader.h\"\n\n"; + DEBUG(errs() << "\n\nALL PATTERNS TO MATCH:\n\n"; + for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), + E = CGP.ptm_end(); I != E; ++I) { + errs() << "PATTERN: "; I->getSrcPattern()->dump(); + errs() << "\nRESULT: "; I->getDstPattern()->dump(); + errs() << "\n"; + }); + + // FIXME: These are being used by hand written code, gross. EmitNodeTransforms(OS); EmitPredicateFunctions(OS); - - DEBUG(errs() << "\n\nALL PATTERNS TO MATCH:\n\n"); - for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), E = CGP.ptm_end(); - I != E; ++I) { - DEBUG(errs() << "PATTERN: "; I->getSrcPattern()->dump()); - DEBUG(errs() << "\nRESULT: "; I->getDstPattern()->dump()); - DEBUG(errs() << "\n"); - } - + #ifdef ENABLE_NEW_ISEL // Add all the patterns to a temporary list so we can sort them. std::vector<const PatternToMatch*> Patterns; @@ -1968,10 +1969,11 @@ void DAGISelEmitter::run(raw_ostream &OS) { TheMatcher = OptimizeMatcher(TheMatcher, CGP); //Matcher->dump(); - EmitMatcherTable(TheMatcher, OS); + EmitMatcherTable(TheMatcher, CGP, OS); delete TheMatcher; #else + // At this point, we have full information about the 'Patterns' we need to // parse, both implicitly from instructions as well as from explicit pattern // definitions. Emit the resultant instruction selector. |