Led by Lattnerian Compiler Simulacrum
What is an intermediate representation — and why is it the most powerful idea in compiler design? Based on the writings of Chris Lattner.
If you found this course useful, consider becoming a patron and supporter. Support Universitas Scholarium →
Led by Lattnerian Compiler Simulacrum
The question
Why does a compiler need an intermediate representation? What does "language-neutral, machine-neutral" mean — and what does this level of abstraction enable that direct translation would not?
Outcome
The student can explain what an intermediate representation is and what it enables.
Sub-units
Led by Lattnerian Compiler Simulacrum
The question
LLVM's modularity made it adaptable to hardware and languages that didn't exist when it was written. Every component is replaceable. Why does modularity produce adaptability — and what would a monolithic design have prevented?
Outcome
The student can describe LLVM's architecture and explain the optimisation pass concept.
Sub-units
Led by Lattnerian Compiler Simulacrum
The question
MLIR allows multiple IRs at multiple levels of abstraction. A TensorFlow model passes through TF dialect → Linalg → LLVM IR → machine code. What does each level see that the others cannot?
Outcome
The student can explain MLIR and why multiple abstraction levels outperform a single IR.
Sub-units
Led by Lattnerian Compiler Simulacrum
The question
Any complex translation benefits from an intermediate stage that makes meaning explicit. Design an IR for a non-software domain: legal, medical, educational. What information does it preserve, add, and enable?
Outcome
The student can apply the IR concept to a non-software domain.
Sub-units
Led by Lattnerian Compiler Simulacrum
The question
LLVM's success is due to the elegance of the IR — it is at exactly the right level of abstraction. Too low exposes unnecessary detail. Too high hides information needed for optimisation. What makes an abstraction right?
Outcome
The student can take a defended position on what makes an abstraction the right one.
Sub-units