Consider the control flow graph given below.
Which one of the following options is the set of live variables at the exit point of each basic block?
Tap to open full sizeFigure description
Control flow graph. ENTRY has an edge to B1. B1: a = b + c. B1 has two outgoing edges: one to B2 and one to B3. B2: d = a + e; B2 has an edge to B4. B3: e = a + f; B3 has an edge back to the top of B1. B4: g = d + e; B4 has an edge to EXIT.
- (A)
B1:{a, b, c, e, f}, B2:{d, e}, B3:{b, c, e, f}, B4:∅
- (B)
B1:∅, B2:{d, e}, B3:{a, c, f}, B4:∅
- (C)
B1:{a, b, c, e, f}, B2:{d, e}, B3:{c, e, f}, B4:∅
- (D)
B1:∅, B2:{d, e, f}, B3:{a, b, c, e, f}, B4:∅