[cfe-commits] r73204 - /cfe/trunk/lib/Frontend/Backend.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Jun 11 13:33:41 PDT 2009
Author: efriedma
Date: Thu Jun 11 15:33:41 2009
New Revision: 73204
URL: http://llvm.org/viewvc/llvm-project?rev=73204&view=rev
Log:
PR4371: Reduce the inlining threshold outside of -O3. This makes
the clang inlining threshold consistent with the threshold for llvm-gcc.
Modified:
cfe/trunk/lib/Frontend/Backend.cpp
Modified: cfe/trunk/lib/Frontend/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Backend.cpp?rev=73204&r1=73203&r2=73204&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Backend.cpp (original)
+++ cfe/trunk/lib/Frontend/Backend.cpp Thu Jun 11 15:33:41 2009
@@ -272,9 +272,13 @@
llvm::Pass *InliningPass = 0;
switch (CompileOpts.Inlining) {
case CompileOptions::NoInlining: break;
- case CompileOptions::NormalInlining:
- InliningPass = createFunctionInliningPass(); // Inline small functions
+ case CompileOptions::NormalInlining: {
+ // Inline small functions
+ unsigned Threshold = (CompileOpts.OptimizeSize ||
+ CompileOpts.OptimizationLevel < 3) ? 50 : 200;
+ InliningPass = createFunctionInliningPass(Threshold);
break;
+ }
case CompileOptions::OnlyAlwaysInlining:
InliningPass = createAlwaysInlinerPass(); // Respect always_inline
break;
More information about the cfe-commits
mailing list