Enter the Dragon: Taming LLVM
summary
Builds a tiny Lisp called cisp in Swift that compiles to LLVM IR, implementing lexer, parser and emitter as a Swift enum AST plus a recursive descent parser, then uses the LLVM C API to emit IR for numbers, binary ops, function prototypes and basic blocks including phi-like control flow. Notes setup pain: must compile LLVM from source and wire headers/libraries before import, but code generation is straightforward and the compiler successfully produces runnable LLVM-backed code.
AI-written summary · about
chapters (11)
- 0:00Introduction to LLVM
- 1:20Compiler design basics
- 3:12LLVM IR overview
- 5:20Understanding LLVM IR
- 9:14Defining the Cisp language
- 11:08Lexing and tokenization
- 13:11Parsing syntax trees
- 17:44Setting up LLVM
- 19:29Code generation in LLVM
- 26:00Control flow and Phi nodes
- 29:26Closing thoughts and Q&A








