News for hackers. Stuff that matters.
Re:A Simple Graph-Based Intermediate Representation (1995) [... by cedex12 on Monday February 03, 2020 @01:36PM (#22227351)
On a related note: What's a good introduction to compiler design ? Has the dragon book been superseded by something yet? Ideally you'd be able to write a decent compiler for your own language after going through it.
Re:A Simple Graph-Based Intermediate Representation (1995) [... by CalChris on Monday February 03, 2020 @03:03PM (#22228350)
The 2nd edition of the Dragon Book is quite good. I don't think it's been surpassed. For myself, I prefer it with respect to compilers much more than I prefer Computer Architecture A Quantitative Approach with respect to computer architecture.
Re:A Simple Graph-Based Intermediate Representation (1995) [... by cedex12 on Tuesday February 04, 2020 @01:05AM (#22232860)
Second edition, as in the first "Compilers: Principles, Techniques, and Tools", or the second ?
Re:A Simple Graph-Based Intermediate Representation (1995) [... by CalChris on Tuesday February 04, 2020 @07:22AM (#22234725)
Re:A Simple Graph-Based Intermediate Representation (1995) [... by thechao on Monday February 03, 2020 @02:46PM (#22228163)
What's wrong with the Dragon Book? Obviously, the older versions won't cover SSA. However, in general, for a hobby project, single-static assignment and abstract interpretation (the modern bits) are only going to help with a very tiny part of the compiler (the optimizer). By the time you need a "lot" of SSA (LICM, SCEV, PEO-register assignment, etc.), you're looking at an easy 10-years of effort, so there'd be no need for an "intro" book at that point...
Re:A Simple Graph-Based Intermediate Representation (1995) [... by pizlonator on Monday February 03, 2020 @06:27PM (#22230537)
For a lot of us, the optimizer is not the tiny part. It's the biggest and most important part.

It does not take 10 years to implement an SSA compiler with LICM, SCEV, and good register allocation. (No idea why you'd want Professional Employer Organizations as part of your RA, but that's just me.) For example, WebKit's B3 compiler took 4 months to write. It's not hard to write it if you know what to write. Hence the need for a good book. Maybe the reason why you think it takes ten years and Professional Employer Organizations is that you never read a good book on the subject!

Re:A Simple Graph-Based Intermediate Representation (1995) [... by brosenlof on Monday February 03, 2020 @08:53PM (#22231574)
Could you recommend a good book/reference?
Re:A Simple Graph-Based Intermediate Representation (1995) [... by pizlonator on Tuesday February 04, 2020 @09:41AM (#22236012)
I can’t! :-(

I learned by interning on a team that knew how to do it right and learning from them and then learning more by word of mouth - asking folks who architected compilers how/why they did things.