From 253410c6e64c86e5b2906345ed21f52672c76272 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sun, 22 Jan 2012 14:08:34 +0000 Subject: [PATCH] Add an option to disable buggy copy propagation pass llvm-svn: 148662 --- lib/CodeGen/LLVMTargetMachine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index a04f3ed3de0..3a9f0f013b1 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -72,6 +72,8 @@ static cl::opt DisableLSR("disable-lsr", cl::Hidden, cl::desc("Disable Loop Strength Reduction Pass")); static cl::opt DisableCGP("disable-cgp", cl::Hidden, cl::desc("Disable Codegen Prepare")); +static cl::opt DisableCopyProp("disable-copyprop", cl::Hidden, + cl::desc("Disable Copy Propagation pass")); static cl::opt PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt PrintISelInput("print-isel-input", cl::Hidden, @@ -463,7 +465,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, } // Copy propagation. - if (getOptLevel() != CodeGenOpt::None) { + if (getOptLevel() != CodeGenOpt::None && !DisableCopyProp) { PM.add(createMachineCopyPropagationPass()); printNoVerify(PM, "After copy propagation pass"); }