summaryrefslogtreecommitdiff
path: root/tools/gccld
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-03 23:06:03 +0000
committerChris Lattner <sabre@nondot.org>2007-02-03 23:06:03 +0000
commita49fd07ec6a8a667d9f666ef3560d5d1a64bcc12 (patch)
treee96a32d71cc925f30d2ca6e8cbad7fe782abfb93 /tools/gccld
parente3683e16519b0fe412f97c706ecdd4eb71dde74c (diff)
downloadllvm-a49fd07ec6a8a667d9f666ef3560d5d1a64bcc12.tar.gz
llvm-a49fd07ec6a8a667d9f666ef3560d5d1a64bcc12.tar.bz2
llvm-a49fd07ec6a8a667d9f666ef3560d5d1a64bcc12.tar.xz
add an instcombine pass to clean up after heavy-lifting IP passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld')
-rw-r--r--tools/gccld/GenerateCode.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index db1caa8270..e70bda307a 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -239,6 +239,12 @@ int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize,
// Remove unused arguments from functions...
addPass(Passes, 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.
+ addPass(Passes, createInstructionCombiningPass());
+
if (!DisableInline)
addPass(Passes, createFunctionInliningPass()); // Inline small functions