Consider the control flow graph shown in the figure.
Which one of the following options correctly lists the set of redundant expressions (common subexpressions) in the basic blocks B4 and B5?
Note: All the variables are integers.
Tap to open full sizeFigure description
Control flow graph. ENTRY -> B1. B1: a = b + i. B1 has edges to B2 and B3. B2: a = g * k, f = d - f, a = c * 4. B3: t = g * k, b = c + m. Both B2 and B3 have an edge to B4. B4: x = g * k, y = b + i. B4 -> B5. B5: z = c + m. B5 -> EXIT.
- (A)
B4: { b + i }; B5: { c + m }
- (B)
B4: { g * k }; B5: { c + m }
- (C)
B4: { g * k, b + i }; B5: { }
- (D)
B4: { g * k }; B5: { }