[PATCH] D132601: [llvm-profdata] Improve profile supplementation
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 08:42:59 PDT 2022
davidxl added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/InstrProf.h:844
+ }
+ void setPseudoCount(bool IsHot) {
+ uint64_t Val = (uint64_t)(IsHot ? HotFunctionVal : WarmFunctionVal);
----------------
pass CountPseudoKind
================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:721
+ CountPseudoKind ThisKind = getCountPseudoKind();
+ // This is less optimial as one of the proifles might not be
+ // a peseudo one and might have better information. But we don't
----------------
typo: proifiles
================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:722
+ // This is less optimial as one of the proifles might not be
+ // a peseudo one and might have better information. But we don't
+ // have summary information here. We cannot tell if the non-pseudo profile
----------------
typo peseudo
================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:725
+ // is better. We just use pesudo profile here.
+ if (OtherKind != NotPseudo || ThisKind != NotPseudo) {
+ bool IsHot = (OtherKind == PseudoHot || ThisKind == PseudoHot);
----------------
We should probably assume/require both profiles are (or not) supplemented, and always take the non pseudo one.
Or do not support merge with supplemented profile (i.e. only supplement after merging).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132601/new/
https://reviews.llvm.org/D132601
More information about the llvm-commits
mailing list