LLVM & MLIR for Absolute Beginners: Build Your First Modern Compiler Step-by-Step - Master LLVM IR, MLIR Dialects, Optimization Pipelines, and Real-Wo
暫譯: LLVM 與 MLIR 給完全初學者的指南:逐步建立您的第一個現代編譯器 - 精通 LLVM IR、MLIR 方言、優化管道及實際應用
Denning, Hollis
- 出版商: Independently Published
- 出版日期: 2025-12-07
- 售價: $1,170
- 貴賓價: 9.5 折 $1,111
- 語言: 英文
- 頁數: 284
- 裝訂: Quality Paper - also called trade paper
- ISBN: 9798277796887
- ISBN-13: 9798277796887
-
相關分類:
Compiler
無法訂購
商品描述
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
- 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.
商品描述(中文翻譯)
LLVM 與 MLIR 給絕對初學者 是一本現代且實用的初學者指南,教你如何使用當今的 LLVM 和 MLIR 工具鏈來構建真正的編譯器。這本書不再依賴過時的教程、複雜的學術解釋或零散的部落格文章,而是逐步教你 LLVM IR、MLIR 方言、優化管道和代碼生成,使用LLVM 20+、MLIR、Clang、CMake Presets、TableGen、Ninja 和 ORC JIT。
這本書直接解決了學習者面臨的最大痛點:
- 沒有指導範例的 LLVM IR 令人困惑
- MLIR 的多層設計難以理解
- 現有資源過舊、不完整或過於高深
- 幾乎沒有書籍同時教授 LLVM 和 MLIR
- 初學者難以從頭到尾構建一個真正的編譯器
這本書採取了不同的方法:你將通過構建真正的程序、運行實際的 IR、將 MLIR 降低到 LLVM IR、進行優化、生成機器碼,最終創建一個完整的工作編譯器來學習。
你將學到什麼- 現代編譯器如何使用多層 IR 工作
- 核心 LLVM IR 概念:SSA、類型、函數、記憶體、控制流
- MLIR 基礎:方言、操作、區域、屬性、類型
- 如何手動編寫 MLIR 並以程式化方式生成它
- 如何將 MLIR 降低到 LLVM 方言,再到 LLVM IR,最後到機器碼
- 如何正確使用 opt、llc、mlir-opt、mlir-translate 和 ORC JIT
- 如何構建實際改善性能的優化管道
- 如何為 x86-64、ARM64 和 RISC-V 生成可執行文件
- 真正的編譯器如何結構其前端和後端
- 絕對初學者
- 學習編譯器或系統程式設計的學生
- 第一次探索 LLVM 或 MLIR 的開發者
- 任何構建 DSL、工具或語言運行時的人
- 希望獲得現代、最新、實用資源的工程師
不需要任何先前的編譯器或 LLVM 經驗。
開始以現代方式構建真正的編譯器 - 使用 LLVM、MLIR 和讓一切變得清晰的實作專案。