Improvements in Tiger Compiler
- We have provided the following functions, to allow better tracking of lexically nested variables within the IR.
- IsSameVar -
- IsSameLevel -
- IsLocal -
- We have delayed the insertion of register saving and loading instructions on subroutine calls to a point just before code generation. This will reduce the amount of redundant code generated.
- We have flattened the original Tree-like IR. Thus, after lowering, operands to statements may only be CONST, TEMP, NAME and MEM(exp), where an expression can be a CONST, TEMP or a binary operation of CONST's and TEMP's.
Thanks to Yung-Yu Chuang for making these improvements.