News for hackers. Stuff that matters.
Re:A Brief and Brisk Overview of Compiler Architecture by nv-vn on Monday April 29, 2019 @10:14AM (#19778496)
The funny thing about compilers is that one architecture has been established as the dominant architecture (the one described here) for probably the past 50 years. Almost without exception, every compiler is structured just about exactly the same. If you're interested in an alternative architecture, it's worth reading up about Nanopass compilers. While largely the same basic ideas, Nanopass tries to distill each discrete action into its own pass -- think of it like composing a bunch of programs using shell pipes. So rather than just Frontend=>Middle End=>Backend you end up with something like Lex=>Parse=>Remove Lambdas=>Remove Loops=>Remove Conditionals=>SSA=>Allocate Registers=>Eliminate Dead Code=>.....
Re:A Brief and Brisk Overview of Compiler Architecture by enos_feedler on Monday April 29, 2019 @01:15PM (#19780337)
When I worked on GPU compiler backends the middle and backend passes basically were a collection of more basic passes that did one thing, in sequence. I wouldn't call this an alternative architecture. I think it's just an implementation detail of the dominant architecture.
Re:A Brief and Brisk Overview of Compiler Architecture by all2 on Monday April 29, 2019 @12:54PM (#19780110)
This? https://nanopass.org/

It sounds like someone took the Unix philosophy "each program should do one thing well" and applied it to compilers.