Built a complete compiler from a lexer, parser, AST construction to code generation for a sun architecture simulator. Performed optimizations such as CSE, data flow analysis and register allocation. Performed code generation for loops, functions, if else statements, for statements.
- CSE
- Data flow analysis
- Liveness
- Register Allocation
A Makefile with the following targets:
- compiler: this target will build your compiler. (-1 for warnings)
- clean: this target will remove any intermediate files that were created to build the compiler.
Tiny is a very simple assembly code interpreter.
Tiny simulates an architecture that has 4 data registers, a stack pointer (sp), a frame pointer (fp) and both integer an floatingpoin arithmetic. All data elements have size 1.
to build tiny: `g++ tiny4regs.C -o tiny'
- make compiler
- Compile tiny
- ./compiler input.micro -o out.a
- ./tiny out.a