MCQ · 2 marks · Optimization and Data Flow

GATE CS 2015 CS-1 — Q46

A variable xx is said to be live at a statement SiS_i in a program if the following three conditions hold simultaneously:

i. There exists a statement SjS_j that uses xx
ii. There is a path from SiS_i to SjS_j in the flow graph corresponding to the program
iii. The path has no intervening assignment to xx including at SiS_i and SjS_j

(Control flow graph: block 1: p=q+rp = q + r, s=p+qs = p + q, u=s∗vu = s * v; block 2: v=r+uv = r + u; block 3: q=s∗uq = s * u; block 4: q=v+rq = 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
Question figure
Select one option