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
This commit is contained in:
Hal Finkel
2012-06-08 15:38:25 +00:00
parent daa03ec604
commit 09fdc7baae
4 changed files with 19 additions and 6 deletions

View File

@@ -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;
}