17 comments

[ 2.3 ms ] story [ 45.6 ms ] thread
The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering.

The course overall looks good, and it's great that so much is available online, so well done, Adrian.

Trace compilation is NOT a dead end.

LuaJIT works just fine. On big programs. On hundreds of millions of servers and devices.

I find it deeply saddening that even scholars keep repeating this trope. Ignorance is bliss.

Tracing JIT compilers are very interesting, and there definitely needs to be more resources on such complex topic.
I'm a bit confused about what makes this course "advanced." Most of the topics (dead code elimination, data flow, dominator analysis, SSA form) seem like they belong in a first course on compilers.
I'm super curious what alexia massalin is up to these days, besides collecting microunity patent royalties
Saw a podcast that talked about the rust compiler, which apparently included machine learning algorithms at some points to determine whether or not you had code that could crash your system
Is there also a self guided course for "basic compilers", before stepping into an advanced level?
I suggest starting with the old but classic Compiler Construction for Digital Computers by David Gries. Pair it with some modern books recommended here and you should be good.

David Gries - https://www.cs.cornell.edu/gries/ and https://en.wikipedia.org/wiki/David_Gries

Dutch computer scientist Dick Grune has written of Compiler Construction for Digital Computers that "entire generations of compiler constructors have grown up with it and they have not regretted it."

Note that Dick Grune himself is famous for his books on compilers/programming languages - https://dickgrune.com/index.html and https://en.wikipedia.org/wiki/Dick_Grune

How does this compare to Nora Sandler's "Writing a C compiler" in terms of the potential gains for the reader?
Her book sits closer to what you'd get from an undergraduate level compilers course, this course covers more advanced material than she does. If you're a novice or a dabbler, start with her book or something else at that level, then try out this course and fill in the gaps as needed.
I found that book to be basically useless as a passive reader.

She basically writes "do this" and you are supposed to do it.

This course is much more valuable because it actually gives a lot of information.

It really feels like most text books on compilers have massive "black hole" sections that pull you in on the technicals that you are not even supposed to use in the end.

I found that his course and the LLVM book by Quentin Colombet really useful because they both give easy to understand information that seems to be actually used in real large systems like LLVM/gcc etc.

There are also book like SSA-based compiler design that seem to be great but I am not able to read because of lacking prior knowledge.

Also thank you to Adrian if he is reading this, he is an amazing teacher and releasing this content is much appreciated

The book is very much supposed to not be read passively.
Thanks for creating and sharing this.
Great material! Thank you.
Are there any other self-guided online university level CS courses like this?
[dead]