Improving Register Allocation
The simple register allocation algorithm can be improved in two ways:
- Handle the case of running out of available registers.
This can be done by storing some register into a temporary variable
- Remember what is contained in registers and
reuse it when appropriate.
This can save some load instructions.