[llvm-commits] [llvm] r93798 - /llvm/trunk/tools/opt/opt.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Jan 18 14:38:31 PST 2010
Author: efriedma
Date: Mon Jan 18 16:38:31 2010
New Revision: 93798
URL: http://llvm.org/viewvc/llvm-project?rev=93798&view=rev
Log:
Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match.
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=93798&r1=93797&r2=93798&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Mon Jan 18 16:38:31 2010
@@ -288,7 +288,17 @@
unsigned OptLevel) {
createStandardFunctionPasses(&FPM, OptLevel);
- llvm::Pass *InliningPass = OptLevel > 1 ? createFunctionInliningPass() : 0;
+ llvm::Pass *InliningPass = 0;
+ if (DisableInline) {
+ // No inlining pass
+ } else if (OptLevel) {
+ unsigned Threshold = 200;
+ if (OptLevel > 2)
+ Threshold = 250;
+ InliningPass = createFunctionInliningPass(Threshold);
+ } else {
+ InliningPass = createAlwaysInlinerPass();
+ }
createStandardModulePasses(&MPM, OptLevel,
/*OptimizeSize=*/ false,
UnitAtATime,
More information about the llvm-commits
mailing list