A variable
x is said to be live at a statement
Si in a program if the following three conditions hold simultaneously:
i. There exists a statement
Sj that uses
xii. There is a path from
Si to
Sj in the flow graph corresponding to the program
iii. The path has no intervening assignment to
x including at
Si and
Sj(Control flow graph: block 1:
p=q+r,
s=p+q,
u=s∗v; block 2:
v=r+u; block 3:
q=s∗u; block 4:
q=v+r; edges 1→2, 1→3, 2→4, 3→4, 4→1.)
The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are