[PATCH] D33389: Fix update VP metadata after inlining for instrumentation PGO

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 21 16:04:59 PDT 2017


tejohnson created this revision.
Herald added a subscriber: mehdi_amini.

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.


https://reviews.llvm.org/D33389

Files:
  lib/Transforms/Utils/InlineFunction.cpp
  test/Transforms/Inline/prof-update-instr.ll
  test/Transforms/Inline/prof-update-sample.ll
  test/Transforms/Inline/prof-update.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33389.99708.patch
Type: text/x-patch
Size: 6995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170521/e26477a5/attachment.bin>


More information about the llvm-commits mailing list