Hacker News new | past | comments | ask | show | jobs | submit login

What about something more specific for production-grade compilers?

The majority of people those references will learn toy-compilers, that are surely important but a completely different league than production-grade compilers, e.g: LLVM.

Talking specifically about LLVM, does someone have their go-to references to start and have a sense of the infrastructure, or even some specific reading about a part of the (huge) infrastructure?




LLVM has a pretty decent walk-through/tutorial for building an LLVM language frontend. I know it's in the article but this is definitely my go to for helping people learn about using LLVM.

https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index...

Not by any means a tutorial but Rust has a guide for understanding their LLVM compiler frontend. It has some useful insights into what actually makes up a real "production grade" compiler outside the stuff in the LLVM tutorial.

https://rustc-dev-guide.rust-lang.org/


Thank you for the references - I'll take a look.

Awesome jobs by Rust to keep something like that (hopefully updated too), since the lack of updated information usually is the bigger barrier of entry for contributing/working on stuff like that. I struggle to find something similar and in-depth for clang, but I guess the bigger complexity makes it more difficult.


I've found that the best way to learn LLVM IR is to write C code and compile it to LLVM IR to see how Clang does it.

This makes the learning process self-serve.

Ref: https://github.com/tanin47/lilit/blob/master/playground/READ...


In which category is Python's byte code compiler? Toy or production-grade?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: