Skip to content
Related Articles

Related Articles

GATE | GATE CS 2021 | Set 2 | Question 48

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 23 May, 2021

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, S1 followed by S2. Which one of the following statements is correct?
(A) OUT(S1) = IN (S2)
(B) OUT (S1) = IN (S1) ∪ USE (S1)
(C) OUT (S1) = IN (S2) ∪ OUT (S2)
(D) OUT (S1) = USE (S1) ∪ IN (S2)

Answer: (A)


No. of variables which are live after S1 will always be the input for S2. 
(Correct Option A)

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!