summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2012-01-22 14:08:34 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2012-01-22 14:08:34 +0000
commit4a309f3d25f3a28065a8ccbd7067afaad745e2d1 (patch)
tree4e85e05fad234bb8c4205f29cb4514c60447ced2 /lib/CodeGen/LLVMTargetMachine.cpp
parent2a53577728948052b8508760406b6ba68e55fc82 (diff)
downloadllvm-4a309f3d25f3a28065a8ccbd7067afaad745e2d1.tar.gz
llvm-4a309f3d25f3a28065a8ccbd7067afaad745e2d1.tar.bz2
llvm-4a309f3d25f3a28065a8ccbd7067afaad745e2d1.tar.xz
Add an option to disable buggy copy propagation pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index a04f3ed3de..3a9f0f013b 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -72,6 +72,8 @@ static cl::opt<bool> DisableLSR("disable-lsr", cl::Hidden,
cl::desc("Disable Loop Strength Reduction Pass"));
static cl::opt<bool> DisableCGP("disable-cgp", cl::Hidden,
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,
cl::desc("Print LLVM IR produced by the loop-reduce pass"));
static cl::opt<bool> 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");
}