Re:So you want to be a compiler wizard (2016)
by jacoblambda on Sunday April 12, 2020 @11:35PM
(#22852974)
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.
Re:So you want to be a compiler wizard (2016)
by hackandtrip on Monday April 13, 2020 @05:03AM
(#22854214)
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.
Re:So you want to be a compiler wizard (2016)
by tanin on Sunday April 12, 2020 @11:40PM
(#22852990)
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...
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?