From 821e00121c3a5d6d2bea9dd63933aa6d19e738f4 Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Fri, 8 Jun 2012 15:38:25 +0000 Subject: 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. llvm-svn: 158206 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp') diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 6f7fc4bb391..bcab83c5cf3 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -23,8 +23,8 @@ using namespace llvm; static cl:: -opt DisableCTRLoops("disable-ppc-ctrloops", cl::Hidden, - cl::desc("Disable CTR loops for PPC")); +opt 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; } -- cgit v1.2.3