This patch sets MaxFunctionCount for SampleProfileReader and SampleProfile pass so that InlineCost can get correct value.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
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.