A data flow analysis based compiler optimizations. Building an intermediate control flow graph and applying optimizations techniques before generating the final MIPS assembly code.
If you run make
it produces a binary called ./optimize. Running
./optimize [name of cish file]
calls the Cish 2 block converter, then runs the following optimizations in the order:
- Common Subexpression Elimination
- Copy Propagation
- Constant Propagation
- Dead Code Elimination
Besides, there are additional test files in the folder named "test".