Live-variable analysis: Difference between revisions

Content deleted Content added
A11ce (talk | contribs)
link to side effects
Line 10:
The set of live variables between lines 2 and 3 is {<code>b</code>, <code>c</code>} because both are used in the multiplication on line 3. But the set of live variables after line 1 is only {<code>b</code>}, since variable <code>c</code> is updated later, on line 2. The value of variable <code>a</code> is not used in this code.
 
Note that the assignment to <code>a</code> may be eliminated as <code>a</code> is not used later, but there is insufficient information to justify removing all of line 3 as <code>f</code> may have [[Side effect (computer science)|side effects]] (printing <code>b * c</code>, perhaps).
 
== Expression in terms of dataflow equations ==