[all-commits] [llvm/llvm-project] 90a8d0: [CSSPGO] [Pseudo-Probe] Avoid infinite loop on cyc...
chandan singh via All-commits
all-commits at lists.llvm.org
Thu Sep 17 19:52:56 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 90a8d09917f0d508292405a68ae1f6de3b40fd93
https://github.com/llvm/llvm-project/commit/90a8d09917f0d508292405a68ae1f6de3b40fd93
Author: chandan singh <36783761+chandankds at users.noreply.github.com>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
A llvm/test/Transforms/SampleProfile/pseudo-probe-call-vs-invoke-hash.ll
A llvm/test/Transforms/SampleProfile/pseudo-probe-cyclic-normal-dest.ll
Log Message:
-----------
[CSSPGO] [Pseudo-Probe] Avoid infinite loop on cyclic invoke destinations (#221630)
SampleProfileProber::getOriginalTerminator() walks invoke normal
destinations (and ignored single-successor blocks) so the CFG hash stays
stable across call-to-invoke conversion. That walk assumes the chain is
acyclic.
Valid IR can have a self-looping invoke (normal dest == the invoke
block). The walk then never returns, and opt -passes=pseudo-probe hangs.
Example Testcase:
```cpp
void f1();
void test() {
try {
for (;;)
f1();
} catch (...) {}
}
```
This patch walk iteratively and record visited blocks. If the next block
was already seen, stop at the terminator that closes the cycle. Acyclic
invoke continuation chains are unchanged.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list