
Register Allocation 265
Now let us re-run Algorithm 7.4, but with three registers. The first five iterations go
exactly as for four registers in our previous example.
1. unhandled: [V32, V33, V34, V35, V36, V37, V38]
current = V32
active: []
inactive: []
free registers: [$t0, $t1, $t2]
Interval V32 is allocated physical register $t0
2. unhandled: [V33, V34, V35, V36, V37, V38]
current = V33
active: [V32]
inactive: []
free registers: [$t1, $t2]
Interval V33 is allocated physical register $t1
3. unhandled: [V34, V35, V36, V37, V38]
current = V34
active: [V32, V33]
inactive: []
free registers: [$t2]
Interval V34 is allocated physical register $t2
4. unhandled: [V35, ...