From: Devang Patel Date: Tue, 27 May 2008 20:42:44 +0000 (+0000) Subject: Add instcombine after global optimizations. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3b75d20c1abd32687fd1d8c4eebcff77160e1b22;p=oota-llvm.git Add instcombine after global optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51611 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/lto2/LTOCodeGenerator.cpp b/tools/lto2/LTOCodeGenerator.cpp index ae97694a920..13ba0db0f6d 100644 --- a/tools/lto2/LTOCodeGenerator.cpp +++ b/tools/lto2/LTOCodeGenerator.cpp @@ -360,6 +360,12 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM // Remove unused arguments from functions... passes.add(createDeadArgEliminationPass()); + // Reduce the code after globalopt and ipsccp. Both can open up significant + // simplification opportunities, and both can propagate functions through + // function pointers. When this happens, we often have to resolve varargs + // calls, etc, so let instcombine do this. + passes.add(createInstructionCombiningPass()); + passes.add(createFunctionInliningPass()); // Inline small functions passes.add(createPruneEHPass()); // Remove dead EH info