[PATCH] D51643: [SampleFDO] Make sample profile loader unaware of compact format change

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 09:52:43 PDT 2018


wmi created this revision.
wmi added reviewers: danielcdh, davidxl.
Herald added subscribers: dexonsmith, mehdi_amini.

The patch tries to make sample profile loader independent of profile format change. It moves compact format related code into FunctionSamples and SampleProfileReader classes, and sample profile loader only have to interact with those two classes and will be unaware of profile format changes.

The cleanup also contain some fixes to further remove the difference between compactbinary format and binary format. After the cleanup using different formats originated from the same profile will generate exactly the same binaries, which we verified by compiling two large server benchmarks w/wo thinlto.


Repository:
  rL LLVM

https://reviews.llvm.org/D51643

Files:
  include/llvm/ProfileData/SampleProf.h
  lib/ProfileData/SampleProf.cpp
  lib/ProfileData/SampleProfReader.cpp
  lib/Transforms/IPO/SampleProfile.cpp
  test/Transforms/SampleProfile/Inputs/function_metadata.compact.afdo
  test/Transforms/SampleProfile/Inputs/function_metadata.prof
  test/Transforms/SampleProfile/Inputs/indirect-call.compact.afdo
  test/Transforms/SampleProfile/function_metadata.ll
  test/Transforms/SampleProfile/indirect-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51643.163853.patch
Type: text/x-patch
Size: 11551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/5325e98e/attachment.bin>


More information about the llvm-commits mailing list