Page MenuHomePhabricator

Remove inline hints computation from SampleProfile.cpp
ClosedPublic

Authored by danielcdh on Apr 19 2016, 2:49 PM.

Details

Summary

As we will move to use uniformed hotness check in inliner, we do not need inline hints in SampleProfile pass any more.

Diff Detail

Event Timeline

danielcdh updated this revision to Diff 54265.Apr 19 2016, 2:49 PM
danielcdh retitled this revision from to Remove inline hints computation from SampleProfile.cpp.
danielcdh updated this object.
danielcdh added reviewers: dnovillo, davidxl.
danielcdh added a subscriber: llvm-commits.
davidxl edited edge metadata.Apr 20 2016, 11:23 AM

This depends on Easwaran's patch to use summary in inliner, right?

davidxl edited edge metadata.Apr 20 2016, 11:24 AM
davidxl added a subscriber: eraman.

This depends on Easwaran's patch to use summary in inliner, right?

Yes, that's correct.

dnovillo edited edge metadata.Apr 20 2016, 11:37 AM

This looks fine, but let's wait until Easwaran's inliner support lands before submitting this change.

The PSI based inline decision has already landed upstream. So now it should be OK to remove the hint based algorithm in sample PGO?

davidxl accepted this revision.Jul 8 2016, 12:54 PM
davidxl edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jul 8 2016, 12:54 PM
eraman added inline comments.Jul 8 2016, 12:58 PM
lib/Transforms/IPO/SampleProfile.cpp
86

Note that the behavior will be different because the threshold for determining cold in ProfileSummary is 1% of max function count and here it is 0.5%. I think this shouldn't matter much, but it is something to be aware of.

danielcdh added inline comments.Jul 8 2016, 1:03 PM
lib/Transforms/IPO/SampleProfile.cpp
86

Thanks for the reminder. This should not affect performance much, and shortly we will use callsite hotness for inline cost.

danielcdh closed this revision.Jul 8 2016, 1:19 PM