Re:Efficiently Computing SSA Form and the Control Dependence...
by tekknolagi on Wednesday August 03, 2022 @11:17AM
(#32332905)
I prefer https://pp.info.uni-karlsruhe.de/uploads/publikationen/braun...
[ Parent
| on HN ]
Re:Efficiently Computing SSA Form and the Control Dependence...
by pizlonator on Wednesday August 03, 2022 @01:36PM
(#32334665)
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.