[PATCH] D148584: [FS-AFDO] Load pseudo probe profile on MIR

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 16:54:18 PDT 2023


hoy created this revision.
Herald added subscribers: wlei, ormris, modimo, wenlei, pengfei, hiraditya.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This change enables loading pseudo-probe based profile on MIR. Different from the IR profile loader, callsites are excluded from MIR profile loading since they are not assinged a FS discriminator. Using zero as the discriminator is not accurate and would undo the distribution work done by the IR loader based on pseudo probe distribution factor. We reply on block probes only for FS profile loading.

Some refactoring is done to the IR profile loader so that `getProbeWeight` can be shared by both loaders.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148584

Files:
  llvm/include/llvm/IR/PseudoProbe.h
  llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
  llvm/lib/CodeGen/MIRSampleProfile.cpp
  llvm/lib/IR/PseudoProbe.cpp
  llvm/lib/Transforms/IPO/SampleProfile.cpp
  llvm/test/CodeGen/X86/Inputs/fsloader-probe.afdo
  llvm/test/CodeGen/X86/fsafdo_probe2.ll
  llvm/test/Transforms/SampleProfile/pseudo-probe-profile-mismatch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148584.514460.patch
Type: text/x-patch
Size: 36248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/dde9e65f/attachment.bin>


More information about the llvm-commits mailing list