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 ae97694..13ba0db 100644
--- a/tools/lto2/LTOCodeGenerator.cpp
+++ b/tools/lto2/LTOCodeGenerator.cpp
@@ -360,6 +360,12 @@
// 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