[PATCH] D86332: [SampleFDO] Enhance profile remapping support for inline instance
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 22 20:47:35 PDT 2020
wenlei added inline comments.
================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:218-222
+ // with equivalent CalleeName using remapping rules. To avoid mixing
+ // profile inline instances at one callsite with inline instances at
+ // other callsites, the CalleeRemapper has to be cleared everytime
+ // before it is used, however the remapping table containing the
+ // remapping rules in the CalleeRemapper will be kept in clearing.
----------------
I guess I didn't fully understand the clearing part - if a function (inlinee) is renamed, why do we not want to apply the remapping globally? E.g. for A->B, and C->B inlined profile, if B is renamed to D, we would want to match D to B for both A->D profile and C->D path, right? Then a global remapper including all names should suffice.
Could you share a concrete example as to why each function needs its own temp remapper for all its inlinees?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86332/new/
https://reviews.llvm.org/D86332
More information about the llvm-commits
mailing list