I’m not entirely convinced that stages 2 & 3 are
necessary, maybe we stop at stage 1. It all depends on
what optimizations we’d like to do that can’t be done
because the IR is in the wrong form. Proceeding with
stages 2 and 3 might gain some efficiency in the compiler
itself because then we don’t have to generate the old IR
at all. I suspect that effect will be small, however.