Rat is a simple compiler backend focused on ease of use. It's inspired by LLVM but focused on more novel approaches (ie. the Sea of Nodes IR) and being much easier to understand (rat is currently only about 20k LoC). To this end, rat focuses on bringing ~70% of LLVM's performance with only a fraction of LLVM's complexity.
$ make # build
$ make test # builds and runs testsoptimization
- FoldPass: Constant folding and algebraic simplification
- GVNPass: Global value numbering
- SCCPPass: Sparse conditional constant propagation
- SimplifyCFGPass: Control-flow simplification
- MemoryOptPass: Load/store forwarding
- InlinePass: Function inlining
codegen
- X86LowerPass: Lower IR to x86 machine instructions
- X86EncodePass: Encode x86 to an ELF object
- CEmitterPass: Emit C code
utility
- VerifyPass: Edge consistency + per-opcode structural invariants
- RenameSymbolPass: Rename a given symbol
- TextEmitterPass: Textual IR viz
- GraphEmitterPass: Graphviz DOT IR viz