wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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)=USE(S1)IN(S2)

No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
OUT(S1)=IN(S1)USE(S1)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C

OUT(S1)=IN(S2)

Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D

OUT(S1)=IN(S2)OUT(S2)

No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C

OUT(S1)=IN(S2)


In live variable analysis at any node, the set of variables live at just after the block are evaluated using the formula.

OUT=IN(Successornodes)
So, the correct option is

OUT(S1)=IN(S2)
So, the correct option (c).


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Conjugate of a Complex Number
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon