llvm-tutor is a collection of out-of-tree LLVM passes designed for teaching and learning compiler development.
The project addresses the challenge of learning LLVM's rich but complex API by providing self-contained, reference implementations of LLVM passes. Rather than requiring developers to build LLVM from source or navigate the full compiler codebase, llvm-tutor demonstrates idiomatic LLVM patterns through standalone passes that can be built against a binary LLVM installation. Each pass is accompanied by comprehensive documentation, CMake build scripts, LIT tests, and CI configuration, making the learning path concrete and testable.
Developers new to LLVM or those wanting to understand how to write custom passes should choose this project. It suits anyone building compiler extensions or optimization passes who needs working examples with clear explanations. The project is kept current with the latest LLVM releases, ensuring that the patterns taught remain relevant. For those interested in similar tutorials targeting Clang rather than LLVM, the README references a companion project.
The project maintains active CI workflows across multiple platforms including Apple Silicon and x86 Ubuntu systems, indicating ongoing testing and compatibility verification. Development activity shows consistent updates to align with new LLVM releases, demonstrating a commitment to keeping the tutorial material current with the compiler infrastructure it teaches.