After finishing the basic
TigerCompiler, extend it with at least one optimization component. Which optimization in which stage of compilation you implement is up to you. Here are some ideas, but other optimizations are also possible
The
TigerOptimize component can be filled with many kinds of optimizations.
- Constant and copy propagation (requires canonicalization)
- Dead code elimination
- Allocate non-escaping records and arrays on the stack
- Make static links explicit (LambdaLifting?)
- Partial evaluation / specialization
- Make memory explicit (introduce
MEM
operator in Tiger)
Improvements of TAS2IR
- Improve stack allocation of escaping variables and spilled local variables (overlap variables that are not live at the same time)
- TailCallElimination
- Target different platforms (e.g. Intel)
- Constant and copy propagation
- Dead code elimination
Transformations on ASM Code
- Improve spilling heuristics in the register allocator
Other
--
EelcoVisser - 04 Dec 2001