GATE CSE 2021 Set 2 Q48: Liveness: relation between OUT(S1) and IN(S2)
- Compiler Design
- 2 marks
- MCQ
- −2/3 if wrong
Question
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?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: A (official GATE 2021 final answer key)
Concept used: OUT of a statement is the union of IN over its successors.
First step: Inside a basic block, has exactly one successor, .
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2021 Set 2 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key
More Compiler Design PYQs
- 2026 Session 1 · Q27Classify errors in three C string declarations
- 2026 Session 1 · Q28True statements about LL(1) parsing
- 2026 Session 1 · Q42Redundant (common) subexpressions in blocks B4 and B5 of a CFG
- 2026 Session 1 · Q53Compare two SDDs for type declarations
- 2026 Session 2 · Q35Count tokens produced by a lexer for a given string
- 2026 Session 2 · Q41Shift-reduce conflicts in the LR(0) table of a grammar