4 ms·
One of the alluring things of SSA form is that many optimizations are much faster to execute on the form. The costly part is to raise the SSA form in the first
by jlouis 11y ago
One of the alluring things of SSA form is that many optimizations are much faster to execute on the form. The costly part is to raise the SSA form in the first place which in the standard implementation requires one to build a costly dominator tree.
You don't need to add every optimization known to man to a compiler, so you can sometimes keep a few of the important ones and then skip every other optimization. A priori, I'd guess SSA would speed up the compiler, which means you end up having a better budget for the more expensive optimizations.
- UniQP 11y agoAs stated in [1] they use a variant of "Simple and Efficient Construction of Static Single Assignment Form" [2], which does not require a dominator tree (or a liveness analysis). [1] https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go#L3473 https://github.com/golang/go/blob/master/src/cmd/compile/int... [2] http://pp.info.uni-karlsruhe.de/uploads/publikationen/braun13cc.pdf http://pp.info.uni-karlsruhe.de/uploads/publikationen/braun1...