C compiler in Clojure

A C compiler in Clojure that builds SQLite and Lua, correctly

It reads C and writes x86-64 assembly. It compiles real programs: SQLite (about 270,000 lines of C) and the Lua 5.4.7 interpreter. Correctness comes first: a change that miscompiles anything is reverted, whatever it gains. The numbers below come from real runs, not from us.

SQLite, compiled by this compiler

The referee builds SQLite with this compiler, runs a corpus of SQL scripts against gcc's build, and counts the instructions each workload executes (callgrind, exact) against gcc -O2's. Lower is better; gcc -O2 is the tick at 1.0×.

this compilergcc -O2 = 1.0×

Programs, side by side with gcc -O2

Small benchmark programs, compiled by this compiler and by gcc -O2. Both must print the same thing. Then the instructions each executes are counted, and one function's assembly is shown from both.

Lua 5.4.7, built by this compiler

How it was made

Three runs, each designed and predicted in writing before it ran (the write-ups are in the repository).

The org of the last run