Skip to content

jjppp/cmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

cmm

NJU Compiler Lab

cmm stands for C-- compiler.

Project structure

Lab
├── Code
│   ├── Makefile
│   ├── lexical.l
│   ├── main.c
│   └── syntax.y
├── README.md
├── Test
│   ├── test1.cmm
│   └── test2.cmm
├── parser
└── report.pdf

Code dir

  1. Stores *.c *.l *.y and Makefile.
  2. Complicated subdirectories are unnecessary.
  3. Please do not modify the Makefile.
  4. Please avoid unreasonable include dependencies.

Test dir

  1. Stores *.cmm test cases.
  2. Uses ./parser to compile these tests.

parser

Executable target file.

TODO

Analyses

  • Live Variables
  • Dominators
  • Reaching Definitions

AST Opt

  • Constant Folding

Local Opt

  • Local Value Numbering

Global Opt

  • Dead Code Elimination
  • Constant Propagation
  • Copy Propagation
  • Loop Invariant Code Motion

Miscellaneous

  • Generic Set Container
  • Better Comments
  • Better Tests

About

NJU Compiler Lab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published