Skip to main content

Compiler Engineering Roadmap

全书学习路线与篇章总览

工程路线总览27 篇 · 135 章

From Source Code to IR, Optimization, Runtime, and Hardware

Part 1: Compiler Worldview and Engineering Mental Model​

01

Chapter 1: Compiler Transformation Model

5 节

进入本章正文 →

02

Chapter 2: Source Code as a Structured System

5 节

进入本章正文 →

03

Chapter 3: Compilation as a Sequence of Representations

5 节

进入本章正文 →

04

Chapter 4: Interpreter, Compiler, Transpiler, and JIT

5 节

进入本章正文 →

05

Chapter 5: Compiler Correctness, Performance, and Developer Experience

5 节

进入本章正文 →

Part 2: Source Text, Tokens, and Lexical Analysis​

01

Chapter 6: Source Text as Raw Characters

5 节

进入本章正文 →

02

Chapter 7: Tokens as the First Structured Representation

5 节

进入本章正文 →

03

Chapter 8: Lexical Rules, Keywords, Identifiers, and Literals

5 节

进入本章正文 →

04

Chapter 9: Whitespace, Comments, Newlines, and Layout-Sensitive Syntax

5 节

进入本章正文 →

05

Chapter 10: Lexer Errors, Diagnostics, and Source Locations

5 节

进入本章正文 →

Part 3: Grammar, Parsing, and Abstract Syntax Trees​

01

Chapter 11: Grammar as the Shape of Valid Programs

5 节

进入本章正文 →

02

Chapter 12: Parsing Token Streams into Structure

5 节

进入本章正文 →

03

Chapter 13: Parse Trees vs Abstract Syntax Trees

5 节

进入本章正文 →

04

Chapter 14: Operator Precedence, Associativity, and Ambiguity

5 节

进入本章正文 →

05

Chapter 15: Parser Error Recovery and Developer Feedback

5 节

进入本章正文 →

Part 4: Semantic Analysis, Symbol Tables, and Scopes​

01

Chapter 16: Names, Bindings, and Program Meaning

5 节

进入本章正文 →

02

Chapter 17: Symbol Tables and Scope Chains

5 节

进入本章正文 →

03

Chapter 18: Declarations, Definitions, and Resolution

5 节

进入本章正文 →

04

Chapter 19: Modules, Imports, and Visibility Rules

5 节

进入本章正文 →

05

Chapter 20: Semantic Errors Beyond Syntax

5 节

进入本章正文 →

Part 5: Type Systems, Type Checking, and Type Inference​

01

Chapter 21: Types as Compile-Time Program Facts

5 节

进入本章正文 →

02

Chapter 22: Static Typing, Dynamic Typing, and Gradual Typing

5 节

进入本章正文 →

03

Chapter 23: Type Checking Expressions, Statements, and Functions

5 节

进入本章正文 →

04

Chapter 24: Generics, Templates, and Parametric Polymorphism

5 节

进入本章正文 →

05

Chapter 25: Type Inference and Constraint Solving

5 节

进入本章正文 →

Part 6: Intermediate Representation and Program Lowering​

01

Chapter 26: Intermediate Representation as Compiler Working Language

5 节

进入本章正文 →

02

Chapter 27: High-Level IR vs Low-Level IR

5 节

进入本章正文 →

03

Chapter 28: Lowering as Controlled Loss of Abstraction

5 节

进入本章正文 →

04

Chapter 29: IR Verification and Structural Invariants

5 节

进入本章正文 →

05

Chapter 30: Designing IR for Analysis and Transformation

5 节

进入本章正文 →

Part 7: Control Flow Graphs, Basic Blocks, and Program Structure​

01

Chapter 31: Basic Blocks as Straight-Line Code Regions

5 节

进入本章正文 →

02

Chapter 32: Control Flow Graphs and Branch Structure

5 节

进入本章正文 →

03

Chapter 33: Dominators, Loops, and Reachability

5 节

进入本章正文 →

04

Chapter 34: Structured Control Flow vs Unstructured Jumps

5 节

进入本章正文 →

05

Chapter 35: Control Flow Evidence in Real Compiler Pipelines

5 节

进入本章正文 →

Part 8: Data Flow Analysis, Def-Use Chains, and Program Facts​

01

Chapter 36: Program Facts and Fixed-Point Thinking

5 节

进入本章正文 →

02

Chapter 37: Reaching Definitions and Live Variables

5 节

进入本章正文 →

03

Chapter 38: Use-Def Chains and Value Tracking

5 节

进入本章正文 →

04

Chapter 39: Forward vs Backward Data Flow Analysis

5 节

进入本章正文 →

05

Chapter 40: Data Flow as the Basis of Optimization

5 节

进入本章正文 →

Part 9: SSA Form and Modern IR Design​

01

Chapter 41: Static Single Assignment and Value Identity

5 节

进入本章正文 →

02

Chapter 42: Phi Nodes, Block Arguments, and Value Merging

5 节

进入本章正文 →

03

Chapter 43: SSA Construction and Destruction

5 节

进入本章正文 →

04

Chapter 44: SSA-Based Optimizations

5 节

进入本章正文 →

05

Chapter 45: SSA as the Language of Modern Optimizers

5 节

进入本章正文 →

Part 10: Optimization Passes and Transformation Pipelines​

01

Chapter 46: Semantics Preserving Transformation Criteria

5 节

进入本章正文 →

02

Chapter 47: Analysis Passes vs Transform Passes

5 节

进入本章正文 →

03

Chapter 48: Constant Folding, DCE, CSE, and Inlining

5 节

进入本章正文 →

04

Chapter 49: Pass Ordering and Optimization Pipelines

5 节

进入本章正文 →

05

Chapter 50: Miscompilation as the Dark Side of Optimization

5 节

进入本章正文 →

Part 11: Memory, Alias Analysis, and Side Effects​

01

Chapter 51: Memory as the Hard Part of Program Analysis

5 节

进入本章正文 →

02

Chapter 52: Pointers, References, and Aliasing

5 节

进入本章正文 →

03

Chapter 53: Escape Analysis and Object Lifetime

5 节

进入本章正文 →

04

Chapter 54: Side Effects, Volatile, and Observable Behavior

5 节

进入本章正文 →

05

Chapter 55: Optimization Under Memory Uncertainty

5 节

进入本章正文 →

Part 12: Loop Optimization, Vectorization, and Parallelism​

01

Chapter 56: Loop Dominance in Performance Engineering

5 节

进入本章正文 →

02

Chapter 57: Loop Invariant Code Motion and Strength Reduction

5 节

进入本章正文 →

03

Chapter 58: Loop Unrolling, Fusion, Fission, and Tiling

5 节

进入本章正文 →

04

Chapter 59: Auto-Vectorization and SIMD Code Generation

5 节

进入本章正文 →

05

Chapter 60: Parallelism, Dependence Analysis, and Safety

5 节

进入本章正文 →

Part 13: Backend Fundamentals and Instruction Selection​

01

Chapter 61: From IR Operations to Target Instructions

5 节

进入本章正文 →

02

Chapter 62: Instruction Selection and Pattern Matching

5 节

进入本章正文 →

03

Chapter 63: Legalization and Target Constraints

5 节

进入本章正文 →

04

Chapter 64: Machine IR and Target-Specific Lowering

5 节

进入本章正文 →

05

Chapter 65: Backend Correctness and Target Semantics

5 节

进入本章正文 →

Part 14: Register Allocation, Stack Frames, and Calling Conventions​

01

Chapter 66: Registers as Scarce Execution Resources

5 节

进入本章正文 →

02

Chapter 67: Liveness, Interference, and Register Allocation

5 节

进入本章正文 →

03

Chapter 68: Spilling, Reloading, and Stack Slot Management

5 节

进入本章正文 →

04

Chapter 69: Stack Frames, Prologues, and Epilogues

5 节

进入本章正文 →

05

Chapter 70: Calling Conventions as Binary-Level Contracts

5 节

进入本章正文 →

Part 15: Object Files, Relocation, Linking, and Debug Information​

01

Chapter 71: Object Files as Partially Built Programs

5 节

进入本章正文 →

02

Chapter 72: Symbols, Sections, and Relocation Records

5 节

进入本章正文 →

03

Chapter 73: Static Linking, Dynamic Linking, and Loaders

5 节

进入本章正文 →

04

Chapter 74: ELF, Mach-O, COFF, and Platform Formats

5 节

进入本章正文 →

05

Chapter 75: Debug Information and Source-Level Observability

5 节

进入本章正文 →

Part 16: Runtime Systems, ABI, Exceptions, and Garbage Collection​

01

Chapter 76: What the Compiler Leaves to the Runtime

5 节

进入本章正文 →

02

Chapter 77: ABI, Runtime Helpers, and Language Support Libraries

5 节

进入本章正文 →

03

Chapter 78: Exception Handling and Stack Unwinding

5 节

进入本章正文 →

04

Chapter 79: Garbage Collection and Memory Safety Support

5 节

进入本章正文 →

05

Chapter 80: Runtime Systems as Execution Partners

5 节

进入本章正文 →

Part 17: Interpreters, Bytecode VMs, and JIT Compilation​

01

Chapter 81: AST Interpreters and Direct Execution

5 节

进入本章正文 →

02

Chapter 82: Bytecode as a Compact Execution Format

5 节

进入本章正文 →

03

Chapter 83: Virtual Machines and Evaluation Loops

5 节

进入本章正文 →

04

Chapter 84: JIT Compilation and Runtime Specialization

5 节

进入本章正文 →

05

Chapter 85: Deoptimization, Inline Caches, and Dynamic Feedback

5 节

进入本章正文 →

Part 18: LLVM Infrastructure and Pass Engineering​

01

Chapter 86: LLVM as a Modular Compiler Infrastructure

5 节

进入本章正文 →

02

Chapter 87: LLVM IR, Modules, Functions, and Basic Blocks

5 节

进入本章正文 →

03

Chapter 88: The LLVM Pass Manager and Analysis Preservation

5 节

进入本章正文 →

04

Chapter 89: Building and Testing LLVM Passes

5 节

进入本章正文 →

05

Chapter 90: Reading Optimized LLVM IR

5 节

进入本章正文 →

Part 19: MLIR, Dialects, and Multi-Level Compiler Infrastructure​

01

Chapter 91: Multi-Level IR and Progressive Lowering

5 节

进入本章正文 →

02

Chapter 92: Dialects as Domain-Specific Compiler Languages

5 节

进入本章正文 →

03

Chapter 93: Operations, Regions, Attributes, and Types

5 节

进入本章正文 →

04

Chapter 94: Dialect Conversion and Progressive Lowering

5 节

进入本章正文 →

05

Chapter 95: MLIR in Heterogeneous and Domain-Specific Compilation

5 节

进入本章正文 →

Part 20: CPython Compilation Pipeline and Bytecode VM​

01

Chapter 96: From Python Source to Tokens

5 节

进入本章正文 →

02

Chapter 97: Parsing Python into AST

5 节

进入本章正文 →

03

Chapter 98: Symbol Table, Scopes, and Code Objects

5 节

进入本章正文 →

04

Chapter 99: AST to CFG to Bytecode

5 节

进入本章正文 →

05

Chapter 100: Evaluation Loop and Runtime Objects

5 节

进入本章正文 →

Part 21: WebAssembly and Portable Runtime Targets​

01

Chapter 101: WebAssembly as a Portable Compilation Target

5 节

进入本章正文 →

02

Chapter 102: Stack Machine, Linear Memory, Tables, and Modules

5 节

进入本章正文 →

03

Chapter 103: Validation, Security, and Sandboxing

5 节

进入本章正文 →

04

Chapter 104: WASI and Host Environment Interfaces

5 节

进入本章正文 →

05

Chapter 105: JIT, AOT, and Runtime Embedding

5 节

进入本章正文 →

Part 22: Shader Compilers, SPIR-V, and GPU Code Generation​

01

Chapter 106: Shader Source as a Specialized Program

5 节

进入本章正文 →

02

Chapter 107: GLSL, HLSL, WGSL, and Frontend Differences

5 节

进入本章正文 →

03

Chapter 108: SPIR-V and GPU-Oriented Intermediate Representation

5 节

进入本章正文 →

04

Chapter 109: Driver Compilers and GPU Machine Code

5 节

进入本章正文 →

05

Chapter 110: Graphics Pipeline State and Shader Optimization

5 节

进入本章正文 →

Part 23: AI Graph Compilers, Tensor IR, and Operator Fusion​

01

Chapter 111: Neural Networks as Computation Graphs

5 节

进入本章正文 →

02

Chapter 112: Tensor Shapes, Layouts, and Type-Like Information

5 节

进入本章正文 →

03

Chapter 113: Graph Optimization and Operator Fusion

5 节

进入本章正文 →

04

Chapter 114: Lowering Tensor IR to Kernels

5 节

进入本章正文 →

05

Chapter 115: Runtime Scheduling, Memory Planning, and Hardware Backends

5 节

进入本章正文 →

Part 24: Database Query Optimizers as Compiler Systems​

01

Chapter 116: SQL as a Declarative Source Language

5 节

进入本章正文 →

02

Chapter 117: Parsing, Binding, and Logical Query Plans

5 节

进入本章正文 →

03

Chapter 118: Cost-Based Optimization and Plan Search

5 节

进入本章正文 →

04

Chapter 119: Physical Operators and Execution Plans

5 节

进入本章正文 →

05

Chapter 120: Query Compilation, JIT, and Vectorized Execution

5 节

进入本章正文 →

Part 25: Compiler Diagnostics, Error Recovery, and Developer Experience​

01

Chapter 121: Diagnostics as a Compiler User Interface

5 节

进入本章正文 →

02

Chapter 122: Source Ranges, Notes, Hints, and Fix-Its

5 节

进入本章正文 →

03

Chapter 123: Syntax Error Recovery

5 节

进入本章正文 →

04

Chapter 124: Semantic Error Reporting

5 节

进入本章正文 →

05

Chapter 125: Designing Diagnostics for Human Understanding

5 节

进入本章正文 →

Part 26: Compiler Testing, Fuzzing, Verification, and Miscompilation Debugging​

01

Chapter 126: Golden Tests, Unit Tests, and Integration Tests

5 节

进入本章正文 →

02

Chapter 127: IR Tests and Pass-Level Verification

5 节

进入本章正文 →

03

Chapter 128: Fuzzing Parsers, Optimizers, and Code Generators

5 节

进入本章正文 →

04

Chapter 129: Differential Testing and Miscompilation Detection

5 节

进入本章正文 →

05

Chapter 130: Reducing and Debugging Compiler Bugs

5 节

进入本章正文 →

Part 27: Building a Small Compiler from Scratch​

01

Chapter 131: Designing a Tiny Language

5 节

进入本章正文 →

02

Chapter 132: Implementing Lexer, Parser, and AST

5 节

进入本章正文 →

03

Chapter 133: Building Semantic Analysis and IR

5 节

进入本章正文 →

04

Chapter 134: Adding Optimizations and Bytecode Execution

5 节

进入本章正文 →

05

Chapter 135: Generating LLVM IR or WebAssembly

5 节

进入本章正文 →