[all-commits] [llvm/llvm-project] f8bab3: [CSSPGO] Fix the issue of missing callee profile m...

Lei Wang via All-commits all-commits at lists.llvm.org
Wed Mar 27 22:27:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8bab38b6dd02f2cd3acc28521d0ccb3186ef616
      https://github.com/llvm/llvm-project/commit/f8bab38b6dd02f2cd3acc28521d0ccb3186ef616
  Author: Lei Wang <wlei at fb.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    A llvm/test/Transforms/SampleProfile/Inputs/pseudo-probe-callee-profile-mismatch.prof
    A llvm/test/Transforms/SampleProfile/csspgo-profile-checksum-mismatch-attr.ll
    A llvm/test/Transforms/SampleProfile/pseudo-probe-callee-profile-mismatch.ll
    M llvm/test/Transforms/SampleProfile/pseudo-probe-stale-profile-matching-lto.ll
    M llvm/test/Transforms/SampleProfile/pseudo-probe-stale-profile-matching.ll

  Log Message:
  -----------
  [CSSPGO] Fix the issue of missing callee profile matches (#85715)

Two fixes related to the callee/inlinee profile:

1. Fix the bug that the matching results are missing to distribute to
the callee profiles (should be pass-by-reference).
2. Narrow imported function matching to checksum mismatched functions. 

More context: before we run matchings for all imported functions even
checksums are matched, however, after we fix 1), we got a regression,
it's likely due to the matching is not no-op for checksum matched
function, so we want to make it consistent to only run matching for
checksum mismatched (imported)functions. Since the
metadata(pseudo_probe_desc) are dropped for imported function, we
leverage the function attribute mechanism and add a new function
attribute(`profile-checksum-mismatch`) to transfer the info from
pre-link to post-link.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list