[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 6 23:51:02 PST 2005



Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.74 -> 1.75
---
Log message:

Allow the selection-dag based selector to be diabled with -disable-pattern-isel.

For now, this is the default, as the current selector is missing some big pieces.
To enable the new selector, pass -disable-pattern-isel=false to llc or lli.



---
Diffs of the changes:  (+11 -2)

Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.74 llvm/lib/Target/X86/X86TargetMachine.cpp:1.75
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.74	Mon Jan  3 10:34:19 2005
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Fri Jan  7 01:50:50 2005
@@ -41,6 +41,9 @@
   cl::opt<bool> DisableOutput("disable-x86-llc-output", cl::Hidden,
                               cl::desc("Disable the X86 asm printer, for use "
                                        "when profiling the code generator."));
+  cl::opt<bool> DisablePatternISel("disable-pattern-isel", cl::Hidden,
+                                 cl::desc("Disable the pattern isel XXX FIXME"),
+                                   cl::init(true));
 
 #if 0
   // FIXME: This should eventually be handled with target triples and
@@ -110,7 +113,10 @@
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());
 
-  PM.add(createX86SimpleInstructionSelector(*this));
+  if (DisablePatternISel)
+    PM.add(createX86SimpleInstructionSelector(*this));
+  else
+    PM.add(createX86PatternInstructionSelector(*this));
 
   // Run optional SSA-based machine code optimizations next...
   if (!NoSSAPeephole)
@@ -165,7 +171,10 @@
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());
 
-  PM.add(createX86SimpleInstructionSelector(TM));
+  if (DisablePatternISel)
+    PM.add(createX86SimpleInstructionSelector(TM));
+  else
+    PM.add(createX86PatternInstructionSelector(TM));
 
   // Run optional SSA-based machine code optimizations next...
   if (!NoSSAPeephole)






More information about the llvm-commits mailing list