mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-03 08:07:51 +00:00
Fix bugzilla bug #5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8324fa7cf2
commit
da78b002ca
@ -97,7 +97,12 @@ int SimpleInliner::getInlineCost(CallSite CS) {
|
||||
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.
|
||||
InlineCost += CalleeFI.NumInsts*10 + CalleeFI.NumBlocks*20;
|
||||
return InlineCost;
|
||||
|
Loading…
x
Reference in New Issue
Block a user