For a statement \(S\) in a program, in the context of liveness analysis, the…

PYQ GATE 2021

For a statement SS in a program, in the context of liveness analysis, the following sets are defined:

USE(S)USE(S) : the set of variables used in SS

IN(S)IN(S): the set of variables that are live at the entry of SS

OUT(S)OUT(S)  : the set of variables that are live at the exit of SS

Consider a basic block that consists of two statements, S1S_1 followed by S2S_2. Which one of the following statements is correct?

  1. A.

    \(\text{OUT(\(S_1\))} = \text{IN (S2S_2)}\)

  2. B.

    \(\text{OUT (\(S_1\))} = \text{IN (S1S_1)} \cup \text{ USE (S1S_1)}\)

  3. C.

    \(\text{OUT (\(S_1\))} = \text{IN (S2S_2) }\cup \text{ OUT (S2S_2)}\)

  4. D.

    \(\text{OUT (\(S_1\))} = \text{USE (S1S_1)} \cup \text{IN (S2S_2)}\)

Attempted by 225 students.

Sign up free to check your answer

Sign up free

Explore the full course: Compiler Design

Loading lesson…