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 = phi [v4, b1], [v12, b2] v10 = mul v9, 8 v11 = mul v9, 8 ; same value number as v10, folded v12 = add v10, v11 br v12 > 0 -> b3, b4