Optimizing SSA compiler

Posted on Mar 1, 2023
phi-net example graph SSA basic-block control flow graph

An optimizing, SSA-based compiler written in Rust. The main optimization is a GVN-PRE pass, which operates directly on code in static single assignment form, and peforms both global value numbering and partial redundancy operation at the same time. The compiler's backend conventionalizes the SSA program, performs register allocation with the help of Z3, and selects RISC-V instructions to produce assembly.