[PATCH] D81981: [PGO] Supplement PGO profile with Sample profile
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 16:53:16 PDT 2020
wmi updated this revision to Diff 280621.
wmi added a comment.
Address David's comments.
The major change is to remove the dependence on always having entry counter in the profile. For function with all zero instr profile or most of zero instr profile, its counters will be set to all -1. All -1 counters indicates the internal profile for the function is unaccountable and also indicates the function is hot. PGO profile-use will drop all the internal counters while set the function entry count to be several times above hot threshold.
I choose to set all counters to all -1 instead of dropping the profile to express the indications above because I am afraid in rare case, PGO profile may be accidently used when building an unrelated target. If we set the functions to be hot when their profiles cannot be found, we may treat all the functions to be hot and that may bloat up the code and trigger compile-time issue.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81981/new/
https://reviews.llvm.org/D81981
Files:
llvm/docs/CommandGuide/llvm-profdata.rst
llvm/include/llvm/ProfileData/InstrProf.h
llvm/include/llvm/ProfileData/InstrProfWriter.h
llvm/lib/ProfileData/InstrProf.cpp
llvm/lib/ProfileData/InstrProfWriter.cpp
llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/test/Transforms/PGOProfile/Inputs/sample-profile.proftext
llvm/test/Transforms/PGOProfile/Inputs/suppl-profile.proftext
llvm/test/Transforms/PGOProfile/suppl-profile.ll
llvm/test/tools/llvm-profdata/Inputs/mix_instr.proftext
llvm/test/tools/llvm-profdata/Inputs/mix_sample.proftext
llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
llvm/tools/llvm-profdata/llvm-profdata.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81981.280621.patch
Type: text/x-patch
Size: 27712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200724/ad53f63b/attachment.bin>
More information about the llvm-commits
mailing list