[PATCH] D132601: [llvm-profdata] Improve profile supplementation
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 14:13:52 PDT 2022
davidxl added inline comments.
================
Comment at: llvm/lib/ProfileData/ProfileSummaryBuilder.cpp:226
// Skip invalid count.
- if (Count == (uint64_t)-1)
+ if (Count == (uint64_t)-1 || Count == (uint64_t)-2)
return;
----------------
probably worth defining symbolic constants for these values.
Also how can we prevent these values are accidentally used somewhere else?
================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:507
// Scale up the MaxCount to be multiple times above hot threshold.
const unsigned MultiplyFactor = 3;
----------------
comment mismatches.
================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:509
const unsigned MultiplyFactor = 3;
- uint64_t Numerator = HotInstrThreshold * MultiplyFactor;
+ uint64_t Threshold = (SetToHot ? HotInstrThreshold : ColdInstrThreshold);
+ uint64_t Numerator = Threshold * MultiplyFactor;
----------------
why using coldthreshold?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132601/new/
https://reviews.llvm.org/D132601
More information about the llvm-commits
mailing list