TIR project aims to provide a flexible compiler and binary analysis toolchain, including various transformations, optimizations and executable generation. It is inspired by LLVM, Bolt and MLIR. At the heart of TIR is a generic intermediate representation and a number of purpose-specific dialects. Users can use it to create new tools by introducing new dialects, optimizations or use it TIR as a generic assembler tool.
TIR is a research project. Unlike MLIR, which is very similar in the spirit, TIR focuses on classic compilers and transformations exclusively (at least for now). The success criteria for the research is to:
- Have a simple C compiler capable of compiling a simple project, like SQLite
- Have a functional RISC-V and/or AArch64 backend
- Have competitive performance on SQLite benchmarks
Once completed, the project is supposed to be good enough to teach students basics of compiler construction and do research in the field of compiler optimizations, including but not limited to ML-driven, affine, solver-based techniques or creating ISA extensions.
backends/
core/
- generic IR definitionssrc/builtin/
- builtin dialect, roughly implementing functionality of LLVM IR
tools/
- tools meant to be distributed as part of the toolchainutils/
- internal utilities, primarily for testing purposes
TIR is a Rust project, and can be built with cargo
, just like any other Rust
project. If you want to contribute to this repository, refer to our
Developer guide and Contribution guide.