Skip to content

yuanmengqi/Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

This is the repository for a simple compiler from lexical analyzer to backend code generation.

  • Constructed a lexical analyzer based on Cminus-F in src/parser/lexical_analyzer.l.
  • Constructed a syntax analyzer in src/parser/syntax_analyzer.y.
  • Completed the automated translation from the syntax tree to intermediate code(light IR) in src/cminusfc/cminusf_builder.cpp based on the Cminus-F parser.
  • Translate intermediate code(light IR) into LoongArch assembly instructions in src/codegen/ and include/codegen/.
  • Improve code generation speed by adding the optimization pass Mem2Reg in include/passes/ and src/passes/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published