enable the branch folding pass for the JIT.

llvm-svn: 31777
This commit is contained in:
Chris Lattner 2006-11-16 01:00:07 +00:00
parent e742d9a4b7
commit e0a70388c2
1 changed files with 3 additions and 0 deletions

View File

@ -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));