Skip to content

HenryHe0123/Mx-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mx Compiler

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.

Progress

  • 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

Optimization

  • Constant Folding (local)
  • Global2Local
  • Mem2Reg (including SSA destruction)
  • Dead Code Elimination
  • Constant Propagation
  • Register Allocation (a simple graph coloring)
  • Block Merging
  • Peephole Optimization