mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
parent
055747bd64
commit
bbfaf77c5d
@ -97,7 +97,12 @@ int SimpleInliner::getInlineCost(CallSite CS) {
|
|||||||
CalleeFI.NumInsts = NumInsts;
|
CalleeFI.NumInsts = NumInsts;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look at the size of the callee. Each basic block counts as 21 units, and
|
// Don't inline into something too big, which would make it bigger. Here, we
|
||||||
|
// count each basic block as a single unit.
|
||||||
|
InlineCost += Caller->size()*2;
|
||||||
|
|
||||||
|
|
||||||
|
// Look at the size of the callee. Each basic block counts as 20 units, and
|
||||||
// each instruction counts as 10.
|
// each instruction counts as 10.
|
||||||
InlineCost += CalleeFI.NumInsts*10 + CalleeFI.NumBlocks*20;
|
InlineCost += CalleeFI.NumInsts*10 + CalleeFI.NumBlocks*20;
|
||||||
return InlineCost;
|
return InlineCost;
|
||||||
|
Loading…
Reference in New Issue
Block a user