[PATCH] D95980: [CSSPGO] Use merged base profile for hot threshold calculation
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 12:29:20 PST 2021
wenlei added a comment.
In D95980#2545546 <https://reviews.llvm.org/D95980#2545546>, @wmi wrote:
> For debug info based CSSPGO, I assume the threshold should be the same, correct?
Yes, this applies to both. In fact the issue was originally uncovered by experimenting with debug info based CSSPGO.
================
Comment at: llvm/lib/ProfileData/SampleProfWriter.cpp:766
SampleProfileSummaryBuilder Builder(ProfileSummaryBuilder::DefaultCutoffs);
for (const auto &I : ProfileMap) {
const FunctionSamples &Profile = I.second;
----------------
wmi wrote:
> ProfileMap --> *ProfilesToUse here?
>
> Actually the computeSummary in the Reader and the Writer are mostly the same. It is better to extract them and make it a shared function somewhere, for example in SampleProfileBuilder.
Good catch, thanks! I moved everything into ProfileSummaryBuilder, including the switch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95980/new/
https://reviews.llvm.org/D95980
More information about the llvm-commits
mailing list