 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
• |
Requires liveness
analysis
|
|
|
|
– |
Determination
of whether a particular value is still in use –
|
|
still needed –
still live
|
|
|
|
– |
If not, the
register holding it can be reused
|
|
|
• |
Control-flow
graph is constructed – paths in the
|
|
|
graph show how
registers are used
|
|
|
• |
To determine
liveness, only need to know whether,
|
|
|
in a particular
instruction, a register
|
|
|
|
– |
is being used
– reading the contained value
|
|
|
|
– |
is being defined
– setting the contained value
|
|