LLVM presentation topic plan
- SSA form
- Alternates to using phis
- MLIR and Wasm block parameters
- CPS equivalence (skip)
- Alternatives for scheduling
- Examples: loops, procedures, branches
- Dominance
- Benefits for opts
- mem2reg
- LLVM architecture
- Opcodes
- Tiered architecture
- Front-ends
- ASTs: Clang
- Language IRs: Rust HIR and MIR, Swift SIL, Flang FIR,
Whitespace, etc.
- General IRs: GIMPLE
- Middle end: LLVM IR
- Backends
- How to use LLVM in your own compiler
- LLVM Kaleidoscope tutorial with Rust Inkwell bindings
- Resources
- Alternatives
- Compilers
- GCC: motivate LLVM design decisions
- QBE
- Futamura (blow minds)
- GraalVM Truffle
- PyPy (is it extensible?)
- Tradeoffs vs LLVM
Day 1: 2022-03-08
- Tiered compiler architecture
- LLVM intermediate representation
- Static single-assignment form
- Instructions
- Type information
Day 2: 2022-03-10
- Compiler for Kaleidoscope
- Kaleidoscope syntax: fib, mandelbrot
- Lexing, parsing
- Algebraic data types: Rust/OCaml vs C++
- Parser combinators: nom’s JSON example
- Lowering
- Builder API
- Control flow and SSA
- Mapping constructs to LLVM IR
- Object-oriented
- Classes
- Virtual methods
- Single inheritance
- Virtual inheritance
- Interfaces
- Boxing and unboxing
- Class equivalence test
- Class inheritance test
- The new operator
- Exception handling: covered on day 1
- Advanced/functional
- Lambda functions
- Generators
- Inkwell JIT example
- LLVM API
- API bindings