[PATCH] D100235: [CSSPGO][llvm-profgen] Always report dangling probes for frames with real samples.

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 23:22:53 PDT 2021


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:518
+    // Ignore dangling probes since they will be reported later if needed.
+    if (Probe->isDangling())
+      continue;
----------------
Try to understand this.

If pass2's probe is dangling, then return 0 no matter what in the profile(pass1);

If pass2's probe is not dangling and reading from profile gets a dangling probe(pass1), then return invalid count(UINT64_MAX), (this case happen because later the BB of the probe will be removed)

is that right? 

So this change make sure all the future removed BB will be identified as dangling so that the inference algorithm can work on this?

is this issue also coming from the rebalancing algorithm? 

like we have TrueBranch :0 and FalseBranch: 0, the rebalancing algorithm can't work on this.

but if we have TrueBranch:0 and FalseBranch:dangling, then it can be rebalanced.














Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100235



More information about the llvm-commits mailing list