2 ms·
That’s a pretty great algorithm. Here’s why I use Cytron’s: you’ll want dominator trees anyway since they provide amazing short-circuit solutions to lots of ot
by pizlonator 4y ago
That’s a pretty great algorithm.
Here’s why I use Cytron’s: you’ll want dominator trees anyway since they provide amazing short-circuit solutions to lots of otherwise annoying problems. Once you have an implementation of dom trees, it’s so easy to implement dominance frontiers, and then it’s trivial to just compute the optimal phi placement from the frontiers.
And then you can reuse the results of the dom analysis for other optimizations downstream from SSA conversion.
So, it’s not that Braun et al is a bad algorithm or that it’s harder to implement in isolation. It’s that Braun’s is harder to implement if you have already built a dom analysis, and you’ll eventually want the dom analysis anyway. So might as well start there.