Since the new instruction selector now works, I don't need to keep
authorChris Lattner <sabre@nondot.org>
Wed, 24 Feb 2010 07:35:09 +0000 (07:35 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 24 Feb 2010 07:35:09 +0000 (07:35 +0000)
the old one around for comparative purposes: have the
ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop
emitting the old isel at all, yay for build time win.

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

utils/TableGen/DAGISelEmitter.cpp
utils/TableGen/DAGISelMatcherEmitter.cpp

index 7a01caab85da6049a298472e5d382681bff439b6..1acd5e13c603cb8b94e4413e3dcb75f0768d268d 100644 (file)
@@ -1794,9 +1794,7 @@ void DAGISelEmitter::EmitInstructionSelector(raw_ostream &OS) {
   
   OS << "// The main instruction selector code.\n"
      << "SDNode *SelectCode(SDNode *N) {\n"
-#ifdef ENABLE_NEW_ISEL
      << "  return SelectCode2(N);\n"
-#endif
      << "  MVT::SimpleValueType NVT = N->getValueType(0).getSimpleVT().SimpleTy;\n"
      << "  switch (N->getOpcode()) {\n"
      << "  default:\n"
@@ -1947,11 +1945,6 @@ void DAGISelEmitter::run(raw_ostream &OS) {
     DEBUG(errs() << "\n");
   }
   
-  // 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.
-  EmitInstructionSelector(OS);  
-  
 #ifdef ENABLE_NEW_ISEL
   MatcherNode *Matcher = 0;
 
@@ -1987,5 +1980,11 @@ void DAGISelEmitter::run(raw_ostream &OS) {
   //Matcher->dump();
   EmitMatcherTable(Matcher, OS);
   delete Matcher;
+  
+#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.
+  EmitInstructionSelector(OS);  
 #endif
 }
index e78be79119d64bd3e5ef6c1349b0e77028088279..e264d77cec578c92ed79cbfa9d429f8ce16ed07a 100644 (file)
@@ -503,7 +503,7 @@ void llvm::EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &O) {
   formatted_raw_ostream OS(O);
   
   OS << "// The main instruction selector code.\n";
-  OS << "SDNode *SelectCode2(SDNode *N) {\n";
+  OS << "SDNode *SelectCode(SDNode *N) {\n";
 
   MatcherTableEmitter MatcherEmitter;