Use ProfileSummary:getProfileCount to get ScaledCount for ModuleSummary
ClosedPublic

Authored by danielcdh on Mon, Mar 20, 3:39 PM.

Details

Summary

ModuleSummary should use the standard interface of ProfileSummary::getProfileCount.

danielcdh created this revision.Mon, Mar 20, 3:39 PM
tejohnson added inline comments.
lib/Analysis/ModuleSummaryAnalysis.cpp
235

We already have the instruction (&I), no need to consult the CS.

test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
53

Do we get a profile count on a call instruction that gives a different weight than the enclosing BB only for SamplePGO I guess?

danielcdh marked an inline comment as done.Mon, Mar 20, 6:22 PM
danielcdh added inline comments.
test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
53

Yes, only SamplePGO sets the profile count on call instructions.

This revision is now accepted and ready to land.Mon, Mar 20, 6:27 PM
danielcdh closed this revision.Tue, Mar 21, 10:34 AM