1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add an option to disable buggy copy propagation pass

llvm-svn: 148662
This commit is contained in:
Anton Korobeynikov 2012-01-22 14:08:34 +00:00
parent 999142ef4a
commit 253410c6e6

View File

@ -72,6 +72,8 @@ static cl::opt<bool> DisableLSR("disable-lsr", cl::Hidden,
cl::desc("Disable Loop Strength Reduction Pass")); cl::desc("Disable Loop Strength Reduction Pass"));
static cl::opt<bool> DisableCGP("disable-cgp", cl::Hidden, static cl::opt<bool> DisableCGP("disable-cgp", cl::Hidden,
cl::desc("Disable Codegen Prepare")); cl::desc("Disable Codegen Prepare"));
static cl::opt<bool> DisableCopyProp("disable-copyprop", cl::Hidden,
cl::desc("Disable Copy Propagation pass"));
static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden, static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden,
cl::desc("Print LLVM IR produced by the loop-reduce pass")); cl::desc("Print LLVM IR produced by the loop-reduce pass"));
static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden, static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden,
@ -463,7 +465,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
} }
// Copy propagation. // Copy propagation.
if (getOptLevel() != CodeGenOpt::None) { if (getOptLevel() != CodeGenOpt::None && !DisableCopyProp) {
PM.add(createMachineCopyPropagationPass()); PM.add(createMachineCopyPropagationPass());
printNoVerify(PM, "After copy propagation pass"); printNoVerify(PM, "After copy propagation pass");
} }