rat is a simple, handmade, and relatively minimal compiler suite (including a C99 frontend, a simple linker, and a Sea of Nodes backend). Some of the features include but are not limited to:
ratcc -O1compilessqlite3.cabout 17x faster thanclang -O1)ratcc -O1code runs within 5% ofgcc -O1and 26% ofclang -O1.- rat is small, readable and easy to hack on.
$ make
$ make test
$ make bench- sccp: sparse conditional constant propagation
- fold: constant folding, algebraic simplification
- simplifycfg: control-flow simplification
- gvn: global value numbering
- memoryopt: load/store forwarding
- inline: function inlining
- strengthreduce: induction-variable strength reduction
- loadcanon: moves loads to their canonical memory state
- slp: scheduling-free SLP vectorization with runtime alias guards
- dfe: dead function elimination
- GCM: global code motion
- x86-lower: instruction selection
- regalloc: bin-packing register allocation
- x86-peephole: copy and spill cleanup
- x86-layout: block layout, loop alignment
- x86-encode: encoding and object emission
- verify: IR invariant checks
- text-emitter: IR dumps as Graphviz
- graph-emitter: IR dumps as text
