1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Move ipsccp pass earlier to clean up obvious bogosities

llvm-svn: 30232
This commit is contained in:
Chris Lattner 2006-09-09 21:30:13 +00:00
parent 2122c2e124
commit 1f4901d69e

View File

@ -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());