summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2012-06-08 15:38:25 +0000
committerHal Finkel <hfinkel@anl.gov>2012-06-08 15:38:25 +0000
commit09fdc7baae1b6905fe18df48e2278e74d4e39ccd (patch)
treeb1a2aadea993ad0d4664fd42e934a9cf05e7238b /lib/Target/PowerPC/PPCTargetMachine.cpp
parentdaa03ec60475a641bcc66799764977f79997ca45 (diff)
downloadllvm-09fdc7baae1b6905fe18df48e2278e74d4e39ccd.tar.gz
llvm-09fdc7baae1b6905fe18df48e2278e74d4e39ccd.tar.bz2
llvm-09fdc7baae1b6905fe18df48e2278e74d4e39ccd.tar.xz
Disable the PPC CTR-Loops pass by default.
The pass itself works well, but the something in the Machine* infrastructure does not understand terminators which define registers. Without the ability to use the block-placement pass, etc. this causes performance regressions (and so is turned off by default). Turning off the analysis turns off the problems with the Machine* infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 6f7fc4bb39..bcab83c5cf 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -23,8 +23,8 @@
using namespace llvm;
static cl::
-opt<bool> DisableCTRLoops("disable-ppc-ctrloops", cl::Hidden,
- cl::desc("Disable CTR loops for PPC"));
+opt<bool> EnableCTRLoops("enable-ppc-ctrloops", cl::Hidden,
+ cl::desc("Enable CTR loops for PPC"));
extern "C" void LLVMInitializePowerPCTarget() {
// Register the targets
@@ -103,9 +103,10 @@ TargetPassConfig *PPCTargetMachine::createPassConfig(PassManagerBase &PM) {
}
bool PPCPassConfig::addPreRegAlloc() {
- if (!DisableCTRLoops && getOptLevel() != CodeGenOpt::None) {
+ // FIXME: Once this can be enabled by default, this condition should read:
+ // if (!DisableCTRLoops && getOptLevel() != CodeGenOpt::None)
+ if (EnableCTRLoops)
PM->add(createPPCCTRLoops());
- }
return false;
}