[PATCH] D95980: [CSSPGO] Use merged base profile for hot threshold calculation

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 14:58:42 PST 2021


wenlei created this revision.
wenlei added reviewers: wmi, hoy, davidxl.
Herald added subscribers: dexonsmith, modimo, lxfind, hiraditya, eraman.
wenlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Context-sensitive profile effectively split a function profile into many copies each representing the CFG profile of a particular calling context. That makes the count distribution looks more flat as we now have more function profiles each with lower counts, which in turn leads to lower hot thresholds. Now we tells threshold computation to merge context profile first before calculating percentile based cutoffs to compensate for seemingly flat context profile. This can be controlled by swtich `sample-profile-contextless-threshold`.

Earlier measurement showed ~0.4% perf boost with this tuning on spec2k6 for CSSPGO (with pseudo-probe and new inliner).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95980

Files:
  llvm/include/llvm/IR/ProfileSummary.h
  llvm/lib/IR/ProfileSummary.cpp
  llvm/lib/ProfileData/SampleProfReader.cpp
  llvm/lib/ProfileData/SampleProfWriter.cpp
  llvm/test/Transforms/SampleProfile/csspgo-inline.ll
  llvm/test/Transforms/SampleProfile/csspgo-summary.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95980.321240.patch
Type: text/x-patch
Size: 9037 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210203/680365ea/attachment.bin>


More information about the llvm-commits mailing list