[llvm] [WebAssembly] Incorporate SCCs into WebAssemblyFixIrreducibleControlFlow (PR #181755)

Demetrius Kanios via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 19 16:57:23 PST 2026


QuantumSegfault wrote:

> FixIrreducible itself gives still a different result for that function (see below) which looks sort of close to what you got in https://github.com/llvm/llvm-project/pull/182237 but not quite exactly.

It seems nearly the same, except for the extra `Routing` blocks added by our version of the pass.


> there is at least one where the FixIrreducible pass itself fails, and another where WebAssemblyCFGSort fails after it. I haven't looked into why; perhaps WebAssemblyCFGSort is implicitly depending on some property beyond just reducibility, although the FixIrreducible failures are slightly more surprising.

The `FixIrreducible` failure is possibly because:
```cpp
// Limitation: The pass cannot handle switch statements and indirect
//             branches. Both must be lowered to plain branches first.
```

I'm not sure why `WebAssemblyCFGSort` is tripping up, but I was planning to investigate the pass anyway since it is another surprisingly expensive one.

https://github.com/llvm/llvm-project/pull/181755


More information about the llvm-commits mailing list