From e0a70388c28fc779917f2bc2c3dcfe09c6f50278 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 16 Nov 2006 01:00:07 +0000 Subject: enable the branch folding pass for the JIT. llvm-svn: 31777 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/CodeGen') 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)); -- cgit v1.2.3