summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-16 01:00:07 +0000
committerChris Lattner <sabre@nondot.org>2006-11-16 01:00:07 +0000
commite0a70388c28fc779917f2bc2c3dcfe09c6f50278 (patch)
tree44272848ac5a33b00e9caa51af1acb3bc11b1725
parente742d9a4b7b9be023e381549c94f9e42b01051f1 (diff)
downloadbcm5719-llvm-e0a70388c28fc779917f2bc2c3dcfe09c6f50278.tar.gz
bcm5719-llvm-e0a70388c28fc779917f2bc2c3dcfe09c6f50278.zip
enable the branch folding pass for the JIT.
llvm-svn: 31777
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index ae13625c205..f113b16f264 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -147,6 +147,9 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
if (PrintMachineCode) // Print the register-allocated code
PM.add(createMachineFunctionPrinterPass(&std::cerr));
+ // Branch folding must be run after regalloc and prolog/epilog insertion.
+ if (!Fast)
+ PM.add(createBranchFoldingPass());
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(&std::cerr));
OpenPOWER on IntegriCloud