[PATCH] D51863: [SampleFDO] Add FunctionOffsetTable in compact binary format profile.

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 09:09:44 PDT 2018


wmi created this revision.
wmi added reviewers: danielcdh, davidxl.
Herald added a subscriber: eraman.

The patch saves a function offset table which maps function name index to the offset of its function profile to the start of the binary profile. By using the function offset table, for those function profiles which will not be used when compiling a module, the profile reader does't have to read them. For profile size around 10~20M, it saves ~10% compile time.


Repository:
  rL LLVM

https://reviews.llvm.org/D51863

Files:
  include/llvm/ProfileData/SampleProf.h
  include/llvm/ProfileData/SampleProfReader.h
  include/llvm/ProfileData/SampleProfWriter.h
  lib/ProfileData/SampleProfReader.cpp
  lib/ProfileData/SampleProfWriter.cpp
  lib/Transforms/IPO/SampleProfile.cpp
  test/Transforms/SampleProfile/Inputs/function_metadata.compact.afdo
  test/Transforms/SampleProfile/Inputs/indirect-call.compact.afdo
  test/Transforms/SampleProfile/Inputs/inline.compactbinary.afdo
  unittests/ProfileData/SampleProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51863.164684.patch
Type: text/x-patch
Size: 17295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180910/892add55/attachment.bin>


More information about the llvm-commits mailing list