A New Algorithm for Identifying Loops in Decompilation, SAS 2007 (The 14th International Static Analysis Symposium) showed that you can identify loops in a single DFS, without the help of a dominator tree. It's simpler than our current implementation which does use a dom tree, and it's also more general since it works on graphs that have irreducible loops.
LLVM recently switched to this approach (llvm/llvm-project#212000) and the author also have a post on the topic: https://maskray.me/blog/irreducible-loops. Unfortunately the primary source is behind a paywall.
We only use LoopInfo for debug output (iongraph) at the moment, though.
A New Algorithm for Identifying Loops in Decompilation, SAS 2007 (The 14th International Static Analysis Symposium) showed that you can identify loops in a single DFS, without the help of a dominator tree. It's simpler than our current implementation which does use a dom tree, and it's also more general since it works on graphs that have irreducible loops.
LLVM recently switched to this approach (llvm/llvm-project#212000) and the author also have a post on the topic: https://maskray.me/blog/irreducible-loops. Unfortunately the primary source is behind a paywall.
We only use
LoopInfofor debug output (iongraph) at the moment, though.