Turning on LSR by default
authorEvan Cheng <evan.cheng@apple.com>
Sun, 19 Mar 2006 06:08:49 +0000 (06:08 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sun, 19 Mar 2006 06:08:49 +0000 (06:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetMachine.cpp

index 3d5a6f8ffe23ce5b77c9be851f55c15f224ddf0a..ef603ea107efa133dd197855c79b0ab93942d76c 100644 (file)
@@ -38,9 +38,6 @@ namespace {
                               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)");
 }
@@ -97,7 +94,7 @@ bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
       FileType != TargetMachine::ObjectFile) return true;
 
   // Run loop strength reduction before anything else.
-  if (EnableX86LSR) PM.add(createLoopStrengthReducePass(&TLInfo));
+  PM.add(createLoopStrengthReducePass(&TLInfo));
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
@@ -165,8 +162,7 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
   TM.setRelocationModel(Reloc::Static);
 
   // Run loop strength reduction before anything else.
-  if (EnableX86LSR)
-    PM.add(createLoopStrengthReducePass(TM.getTargetLowering()));
+  PM.add(createLoopStrengthReducePass(TM.getTargetLowering()));
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());