Simple Register Allocation
Note that there may be several classes of registers, e.g., integer data registers, index registers, floating point registers.
A very simple register allocation algorithm is:
On a machine with 8 or more registers, this algorithm will almost always work. However, we need to handle the case of running out of registers.