diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-09 21:30:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-09 21:30:13 +0000 |
commit | cf508bc38e524c863ec29945dd6e2e8aca3a624b (patch) | |
tree | c0d49e3341959d0f7c3cfde445f66d6109138fa5 | |
parent | 7b166d9969670665d9f093f20ed3381057427256 (diff) | |
download | external_llvm-cf508bc38e524c863ec29945dd6e2e8aca3a624b.zip external_llvm-cf508bc38e524c863ec29945dd6e2e8aca3a624b.tar.gz external_llvm-cf508bc38e524c863ec29945dd6e2e8aca3a624b.tar.bz2 |
Move ipsccp pass earlier to clean up obvious bogosities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30232 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 61bcdfa..38b3d41 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -220,6 +220,11 @@ int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize, // internal. addPass(Passes, createInternalizePass(Internalize)); + // Propagate constants at call sites into the functions they call. This + // opens opportunities for globalopt (and inlining) by substituting function + // pointers passed as arguments to direct uses of functions. + addPass(Passes, createIPSCCPPass()); + // Now that we internalized some globals, see if we can hack on them! addPass(Passes, createGlobalOptimizerPass()); @@ -227,9 +232,6 @@ int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize, // keep one copy of each constant... addPass(Passes, createConstantMergePass()); - // Propagate constants at call sites into the functions they call. - addPass(Passes, createIPSCCPPass()); - // Remove unused arguments from functions... addPass(Passes, createDeadArgEliminationPass()); |