GATE CS 2021 Set 2 | Question 48

Compiler Design › Intermediate Code & Code Optimization · MCQ · 2 marks · Answer: A

  1. Question 48Compiler Designmcq2 marks
    For a statement in a program, in the context of liveness analysis, the following sets are defined: : the set of variables used in . : the set of variables that are live at the entry of . : the set of variables that are live at the exit of . Consider a basic block that consists of two statements, followed by . Which one of the following statements is correct?
    • A.
      ✓
    • B.
    • C.
    • D.

    Answer: A

    Solution

    Within a straight-line basic block, the point after is exactly the point before , so the variables live at the exit of equal those live at the entry of : .

More GATE PYQ on Intermediate Code & Code Optimization

All GATE CS Compiler Design PYQ →

Attempt GATE CS 2021 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →