OSDN Git Service

Permit inlining into huge functions. This heuristic is ancient, and inlining
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 9 Mar 2010 22:17:06 +0000 (22:17 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 9 Mar 2010 22:17:06 +0000 (22:17 +0000)
can sometimes help reduce function size.

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

lib/Analysis/InlineCost.cpp

index ca50a17..140e7da 100644 (file)
@@ -352,11 +352,6 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS,
   // Calls usually take a long time, so they make the inlining gain smaller.
   InlineCost += CalleeFI.Metrics.NumCalls * InlineConstants::CallPenalty;
 
-  // Don't inline into something too big, which would make it bigger.
-  // "size" here is the number of basic blocks, not instructions.
-  //
-  InlineCost += Caller->size()/15;
-  
   // Look at the size of the callee. Each instruction counts as 5.
   InlineCost += CalleeFI.Metrics.NumInsts*InlineConstants::InstrCost;