forked from OSchip/llvm-project
Permit inlining into huge functions. This heuristic is ancient, and inlining
can sometimes help reduce function size. llvm-svn: 98088
This commit is contained in:
parent
9d227a1d5e
commit
5fba36cc1b
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue