aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-13 20:45:56 +0000
committerChris Lattner <sabre@nondot.org>2006-10-13 20:45:56 +0000
commit4a84ad7a2bfd1795357776164e3bf80a2600d924 (patch)
tree0772fbe79bf61d3fa6651ef9c4cac544072919e3 /lib/CodeGen/LLVMTargetMachine.cpp
parentb2cd26127973b97c3ed8d74a063e70a259369e44 (diff)
add the branch folding pass as a late cleanup pass for all targets. For now
it just deletes empty MBB's. Soon it will do more :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index 6c4544a117..18ab218456 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -63,6 +63,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
// Insert prolog/epilog code. Eliminate abstract frame index references...
PM.add(createPrologEpilogCodeInserter());
+ // Branch folding must be run after regalloc and prolog/epilog insertion.
+ PM.add(createBranchFoldingPass());
+
if (PrintMachineCode) // Print the register-allocated code
PM.add(createMachineFunctionPrinterPass(&std::cerr));