[PATCH] D99394: [SampleFDO] Do not scale the magic number NOMORE_ICP_MAGICNUM in value profile during profile update.

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 17:30:12 PDT 2021


wmi created this revision.
wmi added reviewers: davidxl, wenlei, hoy.
Herald added subscribers: dexonsmith, hiraditya.
wmi requested review of this revision.
Herald added a project: LLVM.

When we inline a function and update the profile, the value profiles of the indirect call in the inliner and inlinee will be scaled. In https://reviews.llvm.org/D96806 and https://reviews.llvm.org/D97350, we start using the magic number NOMORE_ICP_MAGICNUM (-1) to mark targets which have been promoted. The magic number shouldn't be scaled during the profile update.

Although the problem has been suppressed by https://reviews.llvm.org/D98187 for SampleFDO, which stops profile update for inlining in sampleFDO, the patch is still wanted since it will be more consistent to handle the magic number properly in profile update.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99394

Files:
  llvm/include/llvm/IR/Metadata.h
  llvm/include/llvm/ProfileData/InstrProf.h
  llvm/lib/IR/Instructions.cpp
  llvm/test/Transforms/SampleProfile/norepeated-icp-4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99394.333473.patch
Type: text/x-patch
Size: 6709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210326/cdea0993/attachment.bin>


More information about the llvm-commits mailing list