[llvm] [FixIrreducible] Use CycleInfo instead of a custom SCC traversal (PR #101386)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 19:26:55 PDT 2024
ssahasra wrote:
Current status: This is going to take a "bit" longer. Turns out that `CreateControlFlowHub` is a heavy hammer which redirects all edges from `Incoming` to `Outgoing`. But this destroys inner cycles when used to fix an irreducible cycle. For some cycle `C` with a subcycle `S`, a block `B` in `S` may have edges going to the header `H` of `C` as well as the header `E` of `S`. Now if the header `E` is also an entry of `C`, then the use of `CreateControlFlowHub` removes the edge from `B` to `E`, thus destroying `S`.
This needs a finer method that redirects only specific edges. Either that, or we let the pass destroy some cycles. But updating `CycleInfo` for these missing subcycles may be a fair amount of work too, so I would rather do it the right way.
https://github.com/llvm/llvm-project/pull/101386
More information about the llvm-commits
mailing list