I’ve been thinking about something for a while now, and promised a year ago in my Optimal Optimization post that I would write it up. One of the difficulties in writing a programming language compiler is that there is a tension between making the pieces of the compiler modular and maintainable, versus making the compiler produce good code. The biggest cause of this tension is over “phase ordering”