-
Notifications
You must be signed in to change notification settings - Fork 4
EDDI Intermediate Representations
wichtounet edited this page Nov 22, 2012
·
2 revisions
EDDI uses three intermediate representations:
- Abstract Syntax Tree (AST): This representation is directly generated by the Boost Spirit Parser. Then, it is transformed by a series of pass by the front end.
- Medium-level Three Address Code (MTAC): The MTAC Compiler generates MTAC code from the AST. This representation is a form of three address code that includes special instructions for instruction calls and branching. Variables are used directly. This representation is language-agnostic. This is the optimization of choice to implement optimizations.
- Low-level Three Address Code (LTAC): This representation is also a form of three address code but very similar to assembly. Can be seen as assembly abstraction. Once all the optimizations have been performed on the MTAC, the LTAC compiler transform it in LTAC. The first version of LTAC use virtual registers. Then, the register allocator allocates them to hard registers. Some optimizations are also run after this stage. Finally, the code generators transform LTAC into assembly.