4 ms·
It is nice and simple indeed but does not really show anything instructive in terms of backend, which is the focus of this thread. And once you go into SSA and
by sklogic 11y ago
It is nice and simple indeed but does not really show anything instructive in terms of backend, which is the focus of this thread.
And once you go into SSA and proper isel, there is no way to do it both easily and compactly at the same time, passes must be split for simplicity or fused into a mess for a compactness.
Of course, I am only talking about a number of lines of code, besides this you can keep your compiler totally trivial for any degree of optimisations complexity.
- nils-m-holm 11y agoIt does show you how to approach building a back-end in the first place, which I would consider to be quite instructive for someone who has never done it before. And it does separate the phases and still remains compact. Of course, once you have progressed to things like SSA, you might want to study something more complex. BTW, the current version of SubC has a much more interesting back-end and even uses AST-level optimization.