Live-variable analysis: Difference between revisions

Content deleted Content added
m fixed typo
mNo edit summary
Line 22:
</table>
 
The dataflow equations used for a given basic block ''s'' and exiting block ''f'' in live variable analysis are the following:

:<math>
{\mbox{GEN(}}[s)] means</math>: theThe set of variables that are used in s before any assignment; .

:<math>
{\mbox{KILL (}}[s)] means</math>: theThe set of variables that are assigned a value in s (in many books, KILL (s) is also defined as the set of variables assigned a value in s ''before any use'', but this doesn't change the solution of the dataflow equation):
 
 
:<math>
{\mbox{LIVE}}_{in}[s] = {\mbox{GEN}}[s] \cup ({\mbox{LIVE}}_{out}[s] - {\mbox{KILL}}[s])
</math>
 
:<math>
{\mbox{LIVE}}_{out}[final] = {\emptyset}