calyx
calyx copied to clipboard
Local/Global value numbering
There are three possible optimizations that can benefit code generated from Dahlia:
- Constant folding
let x = 5; // X is never written to
x + x;
10 * x
- Unused writes
x := 10; // x is never read from
- Redundant stores
let x = 10;
y = x; // x is never written to after this point
This will take some thought to implement since we have to reverse-engineer a group's intent in the same way #177 did (to know which group constitute a useless write).