This is an archive of the discontinued LLVM Phabricator instance.

Fix update VP metadata after inlining for instrumentation PGO
ClosedPublic

Authored by tejohnson on May 21 2017, 4:04 PM.

Details

Summary

With instrumentation profiling, when updating the VP metadata after
an inline, VP metadata on the inlined copy was inadvertantly having
all counts zeroed out. This was causing indirect calls from code inlined
during the call step to be marked as cold in the ThinLTO summaries and
not imported.

The CallerBFI needs to be passed down so that the CallSiteCount can be
computed from the profile summary info. With Sample PGO this was working
since the count is extracted from the branch weight metadata on the
call being inlined (even before we stopped looking at metadata for
non-sample PGO in r302844 this largely wasn't working for instrumentation
PGO since only promoted indirect calls would be getting inlined and have
the metadata).

Added an instrumentation PGO test and renamed the sample PGO test.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.May 21 2017, 4:04 PM
eraman accepted this revision.May 22 2017, 1:21 PM

LGTM

This revision is now accepted and ready to land.May 22 2017, 1:21 PM
This revision was automatically updated to reflect the committed changes.
llvm/trunk/test/Transforms/Inline/prof-update-sample.ll