2 ms·
It's easier to transform your expressions into a useful form from a guaranteed, proper SSA than from a simple tree representation. For example, an induction var
by sklogic 11y ago
It's easier to transform your expressions into a useful form from a guaranteed, proper SSA than from a simple tree representation. For example, an induction variable extraction is totally trivial in SSA, and you really need do to it if you want to reconstruct nice looking `for` loops.
It also pays well to have distinct basic blocks - loop analysis is much easier then.
- tptacek 11y agoThis is helpful. But I read it and think, for instance, "distinct basic blocks aren't SSA"; compilers worked in terms of CFGs before SSA existed. :) Again this is more about my lack of confidence about fully grokking the implications of SSA; I'm not nerd-sniping.
- sklogic 11y agoOf course, you can have basic blocks without an SSA. It's just another feature that was missing from the article that was worth mentioning. Another thing you'll get for free from an SSA - nice ternary expressions reconstructed (even if the original code was using ifs).