[PATCH] D102429: [CSSPGO] Update pseudo probe distribution factor based on inline context.
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 14 14:33:20 PDT 2021
wmi added inline comments.
================
Comment at: llvm/include/llvm/IR/PseudoProbe.h:85
float Factor;
+ DILocation *InlineAt;
----------------
hoy wrote:
> wmi wrote:
> > InlineAt saves the pointer of DILocation which may become dangling easily, so the current intention is to use it in a single pass PseudoProbeUpdatePass. If it is only used in a single pass, can we use a separate map to save the information instead of adding a field in PseudoProbe, so the fields in struct PseudoProbe all contain persistent information.
> Good point! Yes, inside `PseudoProbeUpdatePass` we can use an auxiliary map to save InlineAt. However, there's the `PseudoProbeVerifier` pass that tracker probe duplication throughout the pipeline and we need a globally stable InlineAt there. Since that pass is for debugging only, maybe we can just use a computed a hash for inline stack string though it's a bit slow?
Sounds good. Likely computing a hash for inline stack won't be very slow, then it can be used in both PseudoProbeUpdatePass and PseudoProbeVerifier.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102429/new/
https://reviews.llvm.org/D102429
More information about the llvm-commits
mailing list