This is an experimental compiler that compiles Mx* programming language into RISCV-32I assembly and supports several optimizations below. See the complete project introduction here.
- Lexer & Parser (by ANTLR)
- AST Node Design
- AST Builder
- Semantic Checker
- Pass Semantic Test
- IR Design
- IR Builder
- Pass IR Test
- Assembly Generation
- Pass Assembly Test
- Constant Folding (local)
- Global2Local
- Mem2Reg (including SSA destruction)
- Dead Code Elimination
- Constant Propagation
- Register Allocation (a simple graph coloring)
- Block Merging
- Peephole Optimization