Shameless plug: I've been writing a series that's WIP about writing a tiny optimising compiler - https://github.com/bollu/tiny-optimising-compiler . It tries to model as much as possible, and the aim is to show off the power that modern compiler ideas bring: SSA and polyhedral compilation.
This looks cool, thanks for pointing it out. I'm somewhat familiar witih SSA, but I don't know anything about polyhedral compilation. What does it buy you? Is there a concise intro you could point to? (I thought I had heard someone say it makes your compiler slower for marginal benefit, but they/I could be wrong about that.) FWIW I found this introduction to the new Go SSA back end pretty useful as an overview: https…
Yep, tableGen is nice but would be overkill for this tutorial project.