This Is The Compiler Im Building For CS441
- Must be able to run this cmd
./comp p.441 > p.ir
./comp -noopt p.441 > p.ir- Source to AST conversion
- Compiler must be able to correctly parse all language constructs
- AST to CFG with correct semantics
- CFG must correclty implement runtime behavior
- Tag checks
- Must generate runtime checks to prevent:
- Dereferencing integers -> fail NotAPointer
- Arithmetics on pointers -> fail NotANumber
- CFG to SSA
- Must convert CFG to SSA form correctly using phi and allowed to used the week-2 ssa inefficient approach
- 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
- IR output correctness
- Printed ir must match the spec
- Needs to have: data: code: main:
- Scripts that demonstrate that my optimizations work
- Submit:
- 2 .441 programs
- Optimziation needs to actually be doing something
- README
- Which optimzations i implemented where in teh code it lives any known limiations