diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-13 20:45:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-13 20:45:56 +0000 |
commit | 55ad08a59b588c4846ea56bb8f4093012cb9e8fe (patch) | |
tree | fece5353fc9c3f4de2333155645727d53768fb62 /llvm/lib/CodeGen | |
parent | 951681231685d3b7f52f7313fbb6311293f3870e (diff) | |
download | bcm5719-llvm-55ad08a59b588c4846ea56bb8f4093012cb9e8fe.tar.gz bcm5719-llvm-55ad08a59b588c4846ea56bb8f4093012cb9e8fe.zip |
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 :)
llvm-svn: 30941
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 6c4544a1173..18ab2184568 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/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)); |