A compiler, front to back
A typed source language taken through scanning, recursive-descent parsing, type checking, SSA construction, six optimizing passes and a graph-coloring register allocator with coalescing, emitting machine code that runs.
Why it earns its keepThat the team can choose a representation that makes later work cheap, which is the same skill a pricing engine or an eligibility system needs on day one.
What it is notAn academic instruction set, not a production toolchain. It is a study of representation, not a product.
Run it yourself
- Scale
- ~37k lines
- Optimizing passes
- 6
- Allocator
- Graph coloring, coalescing
- Output
- Executable machine code
b2(v7: i64, v8: i64): v9 = mul v7, 8 v10 = mul v7, 8 ; same value number as v9, folded v11 = add v9, v10 v12 = phi [v11, b2], [v4, b1] br v12 > 0 -> b3, b4