Faith Ekstrandgfxstrand@treehouse.systems
Oct 30, 2026, 6:22 PM@giomasce I think Hans-Kristian's blog post does a better job of explaining the frustration than the algorithm. 😅 (Which makes for a fine blog post, too!) The Mesa one ends up making a lot of similar choices. We just don't use a switch.
I think the biggest difference is how the algorithms reason about the CFG. The Mesa algorithm (and I think HK's as well) do so from more of a graph/dominance perspective while the blog post you linked seems to be reasoning more from structure and trying find it in the node mess.
But that may also be me not understanding the stackifier algorithm.
But at the end of the day, there are a lot of common principals:
- back-edges mean loops
- topological sort to order blocks and group them into which things might come next.
- If irreducible, add a dummy loop to sort it out.