diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-03-09 21:51:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-03-09 21:51:28 +0000 |
commit | 627fb57e191cb4b5ba85e3e7842c5c4826179fe7 (patch) | |
tree | cdb0370349f6f8309d0645a134d22ba9bd2dbc30 /lib/Target/X86/X86TargetMachine.cpp | |
parent | 9a016ff284f7301da20e74fb1304fb17e3d1214d (diff) |
Add option -enable-x86-lsr to enable x86 loop strength reduction pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | lib/Target/X86/X86TargetMachine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 8adce3115d..de7004d97a 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -37,6 +37,10 @@ namespace { 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 @@ bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, 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()); |