Math, asked by akhilbiju4348, 11 months ago

Next use algorithm in compiler design table contruction

Answers

Answered by saniya9343
1
We need to know, for each use of a variable in a basic block,
whether the value contained in the variable will be used again
later in the block.
If a variable has no next-use we can reuse the register
allocated to the variable.
We also need to know whether a variable used in a basic block
is live-on-exit, i.e. if the value contained in the variable has a
use outside the block. The global data-flow analysis we talked
about in the optimization unit can be used to this end.
If no live-variable analysis has been done we assume all
variable are live on exit from the block. This will mean that
when the end of a basic block has been reached, all values
kept only in registers will have to be stored back into their
corresponding variables’ memory locations.

I HOPE IT WILL HELP YOU DEAR
THANKU
Similar questions