[PATCH] D94435: [SampleFDO] Add the support to split the function profiles with context into separate sections.

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 11:06:32 PST 2021


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

For ThinLTO, all the function profiles without context has been annotated to outline functions if possible in prelink phase. In postlink phase, profile annotation in postlink phase is only meaningful for function profile with context. If the profile is large, it is better to split the profile into two parts, one with context and one without, so the profile reading in postlink phase only has to read the part with context. To have the profile splitting, we extend the ExtBinary format to support different section arrangement. It will be flexible to add other section layout in the future without the need to create new class inheriting from ExtBinary class.


Repository:
  rL LLVM

https://reviews.llvm.org/D94435

Files:
  llvm/include/llvm/ProfileData/SampleProf.h
  llvm/include/llvm/ProfileData/SampleProfReader.h
  llvm/include/llvm/ProfileData/SampleProfWriter.h
  llvm/include/llvm/Transforms/IPO/SampleProfile.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/ProfileData/SampleProfReader.cpp
  llvm/lib/ProfileData/SampleProfWriter.cpp
  llvm/lib/Transforms/IPO/SampleProfile.cpp
  llvm/test/Transforms/SampleProfile/Inputs/ctxsplit.extbinary.afdo
  llvm/test/Transforms/SampleProfile/ctxsplit.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94435.315866.patch
Type: text/x-patch
Size: 22515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210111/18f0253f/attachment-0001.bin>


More information about the llvm-commits mailing list