Added all the hooks such that getInlineCost interface can be used in partial inliner. It is important to make sure the partial inliner share the cost model as the primary one.
(partial ininlining is still not enabled)
Details
Diff Detail
Event Timeline
LGTM with a few minor comments.
lib/Transforms/IPO/PartialInlining.cpp | ||
---|---|---|
80 | I know this is how it is in InlineCost.cpp, but still: why not use function_ref everywhere? | |
302 | This is fine, but perhaps you can filter out functions with always_inline attribute earlier and not do the analysis at all. That can be done in a separate patch. Similarly for noinline as well. | |
475 | This should also be moved into the loop above (and the description of the statistic changed to indicate that it is the number of callsites) |
I know this is how it is in InlineCost.cpp, but still: why not use function_ref everywhere?