Increase inliner thresholds by 25.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 4 Feb 2010 18:48:20 +0000 (18:48 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 4 Feb 2010 18:48:20 +0000 (18:48 +0000)
This makes the inliner about as agressive as it was before my changes to the
inliner cost calculations. These levels give the same performance and slightly
smaller code than before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95320 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/Inliner.cpp

index 099027890886733a84750bc0a79480572fe55c93..55cc536717c3d352bd0c8b669c4decb5fc1acb21 100644 (file)
@@ -38,8 +38,8 @@ STATISTIC(NumDeleted, "Number of functions deleted because all callers found");
 STATISTIC(NumMergedAllocas, "Number of allocas merged together");
 
 static cl::opt<int>
-InlineLimit("inline-threshold", cl::Hidden, cl::init(200), cl::ZeroOrMore,
-        cl::desc("Control the amount of inlining to perform (default = 200)"));
+InlineLimit("inline-threshold", cl::Hidden, cl::init(225), cl::ZeroOrMore,
+        cl::desc("Control the amount of inlining to perform (default = 225)"));
 
 Inliner::Inliner(void *ID) 
   : CallGraphSCCPass(ID), InlineThreshold(InlineLimit) {}
@@ -176,7 +176,7 @@ unsigned Inliner::getInlineThreshold(Function* Caller) const {
   if (Caller && !Caller->isDeclaration() &&
       Caller->hasFnAttr(Attribute::OptimizeForSize) &&
       InlineLimit.getNumOccurrences() == 0)
-    return 50;
+    return 75;
   else
     return InlineThreshold;
 }