OSDN Git Service

Rewrite how the indirect call bonus is handled. This now works by:
authorEric Christopher <echristo@apple.com>
Sat, 5 Feb 2011 00:49:15 +0000 (00:49 +0000)
committerEric Christopher <echristo@apple.com>
Sat, 5 Feb 2011 00:49:15 +0000 (00:49 +0000)
commit4e8af6db184118638c21f713ad98e3292c6891c9
tree4527fa0f07aef9b250bdbc195ff97edd97f13eb9
parent66c357dbc44c3f3fe1b789f1ad581bd55f25dea4
Rewrite how the indirect call bonus is handled. This now works by:

a) Making it a per call site bonus for functions that we can move from
indirect to direct calls.
b) Reduces the bonus from 500 to 100 per call site.
c) Subtracts the size of the possible newly inlineable call from the
bonus to only add a bonus if we can inline a small function to devirtualize
it.

Also changes the bonus from a positive that's subtracted to a negative
that's added.

Fixes the remainder of rdar://8546196 by reducing the object file size
after inlining by 84%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124916 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/InlineCost.h
lib/Analysis/InlineCost.cpp