LLVM & MLIR for Absolute Beginners: Build Your First Modern Compiler Step-by-Step - Master LLVM IR, MLIR Dialects, Optimization Pipelines, and Real-Wo

by Denning, Hollis
ISBN: 9798277796887
Availability:
  • Online Only
$23.54

Available Offers


Pickup at {0} Out of stock at {0} Check other stores
FREE -
Ship to Me
$3.99 -

Overview

LLVM & MLIR for Absolute Beginners is the modern, practical beginner's guide to building real compilers using today's LLVM and MLIR toolchains. Instead of outdated tutorials, complex academic explanations, or scattered blog posts, this book teaches you LLVM IR, MLIR dialects, optimization pipelines, and code generation step-by-step, using LLVM 20+, MLIR, Clang, CMake Presets, TableGen, Ninja, and ORC JIT.

This book directly solves the biggest pain points learners face:
- LLVM IR is confusing without guided examples
- MLIR's multi-level design is difficult to understand
- Existing resources are old, incomplete, or too advanced
- Almost no books teach LLVM + MLIR together
- Beginners struggle to build a real compiler end-to-end

This book takes a different approach: you learn by building real programs, running actual IR, lowering MLIR to LLVM IR, optimizing it, generating machine code, and finally creating a complete working compiler.

What You Will Learn

- How modern compilers work using multi-level IR
- Core LLVM IR concepts: SSA, types, functions, memory, control flow
- MLIR basics: dialects, ops, regions, attributes, types
- How to write MLIR by hand and generate it programmatically
- How to lower MLIR → LLVM dialect → LLVM IR → machine code
- How to use opt, llc, mlir-opt, mlir-translate, and ORC JIT correctly
- How to build optimization pipelines that actually improve performance
- How to generate executables for x86-64, ARM64, and RISC-V
- How real compilers structure their frontends and backends

Who This Book Is For

- Absolute beginners
- Students learning compilers or systems programming
- Developers exploring LLVM or MLIR for the first time
- Anyone building DSLs, tools, or language runtimes
- Engineers who want a modern, up-to-date, hands-on resource

No prior compiler or LLVM experience required.

Start building real compilers the modern way - with LLVM, MLIR, and hands-on projects that make everything clear.

  • Format: Trade Paperback
  • Author: Denning, Hollis
  • ISBN: 9798277796887
  • Condition: New
  • Dimensions: 11.00 x 0.60
  • Number Of Pages: 284
  • Publication Year: 2025
Language: English