GATE CS 2021 (Afternoon) — Question 48

Compiler DesignData Flow Analysis: Constant Propagation, Liveliness Analysis, Common Subexpression EliminationMCQ2 marks · −2/3 if wrongEasy

For a statement \(S\) in a program, in the context of liveness analysis, the following sets are defined : \(USE(S)\) : the set of variables used in \(S\) \(IN(S)\) : the set of variables that are live at the entry of \(S\) \(OUT(S)\) : the set of variables that are live at the exit of \(S\) Consider a basic block that consists of two statements, \(S_1\) followed by \(S_2\). Which one of the following statements is correct?
  1. A
    \(OUT(S_1) = IN(S_2)\)
  2. B
    \(OUT(S_1) = IN(S_1) \cup USE(S_1)\)
  3. C
    \(OUT(S_1) = IN(S_2) \cup OUT(S_2)\)
  4. D
    \(OUT(S_1) = USE(S_1) \cup IN(S_2)\)
Practise the full 2021-AN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAFree All-India Mock — every SundayA full GATE CS paper, exactly 180 minutes, ranked across India with your GATE score.
Practise more on Data Flow Analysis: Constant Propagation, Liveliness Analysis, Common Subexpression EliminationTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group