1
GATE CSE 2024 Set 1
MCQ (Single Correct Answer)
+2
-0.66

Consider the following pseudo-code.

L1: t1 = -1
L2: t2 = 0
L3: t3 = 0
L4: t4 = 4 * t3
L5: t5 = 4 * t2
L6: t6 = t5 * M
L7: t7 = t4 + t6
L8: t8 = a[t7]
L9: if t8 <= max goto L11
L10: t1 = t8
L11: t3 = t3 + 1
L12: if t3 < M goto L4
L13: t2 = t2 + 1
L14: if t2 < N goto L3
L15: max = t1

Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively ?

A

6 and 6

B

6 and 7

C

7 and 7

D

7 and 6

2
GATE CSE 2023
MCQ (Single Correct Answer)
+2
-0.67

Consider the control flow graph shown.

GATE CSE 2023 Compiler Design - Code Generation and Optimization Question 2 English

Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?

A
B1: {}, B2: {a}, B3: {a}, B4: {a}
B
B1: {i, j}, B2: {a}, B3: {a}, B4: {i}
C
B1: {a, i, j}, B2: {a, i, j}, B3: {a, i}, B4: {a}
D
B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j}
3
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
A variable x is said to be live at a statement $${S_i}$$ in a programif the following three conditions hold simultaneously:

i. There exists a statement $${S_j}$$ that uses x
ii. There is a path from $${S_i}$$ to $${S_j}$$ in the flow graph corresponding to the program
iii. The path has no intervening assignment to x including at $${S_i}$$ and $${S_j}$$

GATE CSE 2015 Set 1 Compiler Design - Code Generation and Optimization Question 6 English

The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are

A
p, s, u
B
r, s, u
C
r, u
D
q, v
4
GATE CSE 2015 Set 1
Numerical
+2
-0
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $$q + r / 3 + s - t * 5 + u * v/w$$ is _______________.
Your input ____
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12