Skip to content

SamiiShabuse/Compiler-For-Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler-For-Rust

This Is The Compiler Im Building For CS441

Submission Requirements to get a 100

  1. Must be able to run this cmd
./comp p.441 > p.ir
./comp -noopt p.441 > p.ir
  1. Source to AST conversion
  • Compiler must be able to correctly parse all language constructs
  1. AST to CFG with correct semantics
  • CFG must correclty implement runtime behavior
  1. Tag checks
  • Must generate runtime checks to prevent:
    • Dereferencing integers -> fail NotAPointer
    • Arithmetics on pointers -> fail NotANumber
  1. CFG to SSA
  • Must convert CFG to SSA form correctly using phi and allowed to used the week-2 ssa inefficient approach
  1. One peephole optimization
  • Either constnat folding or remove tag checks on this
  • Rules:
    • Optimizaiton must be local to a basic block
    • Must be able to disable with -noopt flag
  1. IR output correctness
  • Printed ir must match the spec
  • Needs to have: data: code: main:
  1. Scripts that demonstrate that my optimizations work
  • Submit:
    • 2 .441 programs
    • Optimziation needs to actually be doing something
  1. README
    • Which optimzations i implemented where in teh code it lives any known limiations

About

This Is The Compiler Im Building For CS441

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages