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

Evan Cheng evan.cheng at apple.com
Thu Mar 9 13:51:41 PST 2006



Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.105 -> 1.106
---
Log message:

Add option -enable-x86-lsr to enable x86 loop strength reduction pass.


---
Diffs of the changes:  (+7 -0)

 X86TargetMachine.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.105 llvm/lib/Target/X86/X86TargetMachine.cpp:1.106
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.105	Wed Feb 22 14:19:42 2006
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Thu Mar  9 15:51:28 2006
@@ -37,6 +37,10 @@
   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> EnableX86LSR("enable-x86-lsr", cl::Hidden,
+                              cl::desc("Enable the X86 loop strength reduction "
+                                       "pass."));
   // Register the target.
   RegisterTarget<X86TargetMachine> X("x86", "  IA-32 (Pentium and above)");
 }
@@ -92,6 +96,9 @@
   if (FileType != TargetMachine::AssemblyFile &&
       FileType != TargetMachine::ObjectFile) return true;
 
+  // Run loop strength reduction before anything else.
+  if (EnableX86LSR) PM.add(createLoopStrengthReducePass());
+
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
 






More information about the llvm-commits mailing list