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
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a few minor comments.
lib/Transforms/IPO/PartialInlining.cpp | ||
---|---|---|
80 ↗ | (On Diff #97250) | I know this is how it is in InlineCost.cpp, but still: why not use function_ref everywhere? |
302 ↗ | (On Diff #97250) | 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 ↗ | (On Diff #97250) | 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) |