Changes in directory llvm/lib/CodeGen:
LLVMTargetMachine.cpp updated: 1.11 -> 1.12 --- Log message: move a bunch of code out of the sdisel pass into its own opt pass "codegenprepare". --- Diffs of the changes: (+20 -2) LLVMTargetMachine.cpp | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/LLVMTargetMachine.cpp diff -u llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.11 llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.12 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.11 Fri Mar 30 19:24:43 2007 +++ llvm/lib/CodeGen/LLVMTargetMachine.cpp Fri Mar 30 23:18:03 2007 @@ -23,7 +23,7 @@ using namespace llvm; static cl::opt<bool> PrintLSR("print-lsr-output"); - +static cl::opt<bool> PrintISelInput("print-isel-input"); FileModel::Model LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM, std::ostream &Out, @@ -48,6 +48,13 @@ // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); + if (!Fast) + PM.add(createCodeGenPreparePass(getTargetLowering())); + + if (PrintISelInput) + PM.add(new PrintFunctionPass("\n\n*** Final LLVM Code input to ISel *** \n", + &cerr)); + // Ask the target for an isel. if (addInstSelector(PM, Fast)) return FileModel::Error; @@ -126,7 +133,11 @@ // Standard LLVM-Level Passes. // Run loop strength reduction before anything else. - if (!Fast) PM.add(createLoopStrengthReducePass(getTargetLowering())); + if (!Fast) { + PM.add(createLoopStrengthReducePass(getTargetLowering())); + if (PrintLSR) + PM.add(new PrintFunctionPass("\n\n*** Code after LSR *** \n", &cerr)); + } // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); @@ -137,6 +148,13 @@ // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); + if (!Fast) + PM.add(createCodeGenPreparePass(getTargetLowering())); + + if (PrintISelInput) + PM.add(new PrintFunctionPass("\n\n*** Final LLVM Code input to ISel *** \n", + &cerr)); + // Ask the target for an isel. if (addInstSelector(PM, Fast)) return true; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits