[llvm-commits] [llvm] r49848 - /llvm/trunk/tools/opt/opt.cpp
Duncan Sands
baldrick at free.fr
Thu Apr 17 05:03:51 PDT 2008
Author: baldrick
Date: Thu Apr 17 07:03:38 2008
New Revision: 49848
URL: http://llvm.org/viewvc/llvm-project?rev=49848&view=rev
Log:
Run SimplifyLibCalls near the beginning, not at
the end. It is now run at the same moment as in
llvm-gcc. Also, run StripDeadPrototypes at the
end, just before running DeadTypeElimination.
This may be useful when doing LTO. Note that
llvm-gcc runs StripDeadPrototypes but not
DeadTypeElimination.
Modified:
llvm/trunk/tools/opt/opt.cpp
Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=49848&r1=49847&r2=49848&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Thu Apr 17 07:03:38 2008
@@ -262,6 +262,7 @@
if (!DisableInline)
addPass(PM, createFunctionInliningPass()); // Inline small functions
+ addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations
addPass(PM, createArgumentPromotionPass()); // Scalarize uninlined fn args
addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code
@@ -294,7 +295,7 @@
addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
- addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations
+ addPass(PM, createStripDeadPrototypesPass()); // Get rid of dead prototypes
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types
addPass(PM, createConstantMergePass()); // Merge dup global constants
}
More information about the llvm-commits
mailing list