This is a repository containing implementations of analyses, optimizations, and other passes using the Big Red Intermediate Language. Originally for CS 6120 at Cornell.
Each of these tools is developed unix style and communicates via the shell.
bril-rs
- Simple rust library for interfacing with Bril. Taken from Patrick LaFontaine in the BRIL Repo with some small modifications.brilirs
- A BRIL interpreter written in Rust. Taken from William Thompson in the BRIL repo with some small modifcations.cfg
- Library for constructing CFGs and performing data flow analyses. Currently implemented analyses include reaching definitions, constructing dominator trees, live variables, loop invariant instructions, and finding natural loops.bril2cfg
- Converts bril to dot graphs. Can convert to CFG graphs, display data flow analyses, and display the dominator tree.test
- Test directory for TURNT snapshot tests. Most tests come from the bril repo benchmarks.dummy-pass
- Simply converts a bril program into a CFG and back into a bril program. Removes unnecessary jumps in the conversion process.local-dce
- Dead code elimination as a local optimization performed on basic blocks. Also performs trivial global DCE by removing all pure instructions which don't have their return values readcommon-cli
- Procedural macros for the basic CLI options and interactions for compiler passeslvn
- Local value numbering performed on basic blocks. Also does constant folding, constant propagation, copy propagation, and algebraic simplification at a basic block level.dce
- (Regular/Global) dead code eliminationlicm
- Loop invariant code motionssa
- Conversion into and out of SSA with semi-aggressive coalescingis-ssa
- Asserts that a program is in SSA form or does not contain any phi nodes (depending on arguments)gc
- A (sort-of) incremental, generational garbage collector forbrilirs