Modern computing needs compilers that can handle multiple abstraction levels and target diverse hardware efficiently. MLIR (Multi-Level Intermediate Representation), developed as part of the LLVM ecosystem, is at the heart of this evolution. It enables compiler engineers to design modular, extensible, and scalable compilers that bridge high-level frameworks and low-level hardware backends.
MLIR Foundations of Next Generation Compilers is Volume One in the MLIR Foundations and Next Generation Compiler Engineering series. This volume introduces the core building blocks of MLIR, moving beyond documentation to provide step-by-step guidance, annotated code, and diagrams that make complex ideas approachable.
In Volume One, you will
The evolution of compiler IRs and why MLIR is different
MLIR operations, attributes, regions, types, and blocks
How to install, configure, and use MLIR tools
Writing and verifying MLIR programs from scratch
Creating custom dialects, operations, and validation rules
Writing transformation passes and debugging pipelines
Progressive lowering from high-level dialects to LLVM IR
Preparing for Volume Two This first volume gives you a strong foundation in MLIR concepts and workflows. Volume Two, MLIR Applied Development for Compilers and Accelerators, builds on these foundations and takes you into advanced territory,
Optimizing kernels with MLIR transformations
Integrating MLIR with TensorFlow, PyTorch, and XLA
Targeting GPUs, TPUs, and custom accelerators
End-to-end workflows from high-level frameworks to machine code
Real-world compiler case studies and lessons from industry adoption
Together, the two volumes form a complete learning from grasping the fundamentals of MLIR to mastering advanced applications in modern compiler engineering.