This is an archive of the discontinued LLVM Phabricator instance.

Set MaxFunctionCount for SampleProfileReader.
AbandonedPublic

Authored by danielcdh on Feb 18 2016, 4:32 PM.

Details

Summary

This patch sets MaxFunctionCount for SampleProfileReader and SampleProfile pass so that InlineCost can get correct value.

Diff Detail

Event Timeline

danielcdh updated this revision to Diff 48426.Feb 18 2016, 4:32 PM
danielcdh retitled this revision from to Set MaxFunctionCount for SampleProfileReader..
danielcdh updated this object.
danielcdh added reviewers: davidxl, dnovillo, eraman.
danielcdh added a subscriber: llvm-commits.
eraman edited edge metadata.Feb 18 2016, 5:08 PM

I'm going to check in a patch (Diego has approved it) that will provide profile summary to sample profile reader. Profile summary has max function count, so you should be able to call something like M.setMaximumFunctionCount(Reader->getProfileSummary()->getHeadSamples()). I am also going to replace the MaxFunctionCount module flag with a flag for profile summary. One that lands, setMaximumFunctionCount will be obsolete. So I suggest that you drop this patch.

danielcdh abandoned this revision.Feb 18 2016, 5:59 PM

This patch will be obsolete once Easwaran's inline summary patch is in.