[PATCH] D102429: [CSSPGO] Update pseudo probe distribution factor based on inline context.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 14 09:58:57 PDT 2021


hoy added inline comments.


================
Comment at: llvm/include/llvm/IR/PseudoProbe.h:85
   float Factor;
+  DILocation *InlineAt;
 
----------------
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?


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