[PATCH] D156722: [CSSPGO] Support stale profile matching for LTO

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 11:57:07 PDT 2023


wlei added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2130
+          if (FunctionSamples::ProfileIsProbeBased &&
+              isa<PseudoProbeInst>(&I)) {
+            // For pseudo probe mode, extracting inline info from the probe inst
----------------
hoy wrote:
> hoy wrote:
> > Do we also want to flatten for callsite probes?
> Also should this be done under `FlattenProfileForMatching`?
> Do we also want to flatten for callsite probes?

Block probe should be sufficient. for every callsite, there should be a block probe in the same BB, so their debug info inline stack is the same. 

> Also should this be done under FlattenProfileForMatching?
Not sure if this will works with FlattenProfileForMatching off. Maybe we even don't need this ``FlattenProfileForMatching` switch, I'm thinking FlattenIR or FlattenProfile should be always beneficial to the matching. Or maybe we need another switch `FlattenIRForMatching` 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156722/new/

https://reviews.llvm.org/D156722



More information about the llvm-commits mailing list