5 ms·
What about something more specific for production-grade compilers? The majority of people those references will learn toy-compilers, that are surely important
by hackandtrip 6y ago
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?
- jacoblambda 6y agoLLVM 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.html 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/ https://rustc-dev-guide.rust-lang.org/
- hackandtrip 6y agoThank 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.
- tanin 6y agoI'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/README.md https://github.com/tanin47/lilit/blob/master/playground/READ...
- kazinator 6y agoIn which category is Python's byte code compiler? Toy or production-grade?