1
GATE CSE 2026 Set 2
MCQ (Single Correct Answer)
+2
-0

Consider the control flow graph given below.

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

Which one of the following options is the set of live variables at the exit point of each basic block?

A

B1: $\{a, b, c, e, f\}, B 2:\{d, e\}, B 3:\{b, c, e, f\}, B 4: \phi$

B

B1: $\phi, B 2:\{d, e\}, B 3:\{a, c, f\}, B 4: \phi$

C

B1: $\{a, b, c, e, f\}, B 2:\{d, e\}, B 3:\{c, e, f\}, B 4: \phi$

D

B1: $\phi, B 2:\{d, e, f\}, B 3:\{a, b, c, e, f\}, B 4: \phi$

2
GATE CSE 2026 Set 1
MCQ (Single Correct Answer)
+2
-0

$$ \text { Consider the control flow graph shown in the figure. } $$

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

Which one of the following options correctly lists the set of redundant expressions (common sub-expressions) in the basic blocks B4 and B5?

Note: All the variables are integers.

A

$$ \begin{aligned} & \text { B4: }\{b+i\} \\ & \text { B5: }\{c+m\} \end{aligned} $$

B

$$ \begin{aligned} & \text { B4: }\{g * k\} \\ & \text { B4: }\{c+m\} \end{aligned} $$

C

$$ \begin{aligned} & \text { B4: }\{g * k, b+i\} \\ & \text { B5: }\} \end{aligned} $$

D

$$ \begin{aligned} & \text { B4: }\{g * k\} \\ & \text { B5: }\} \end{aligned} $$

3
GATE CSE 2025 Set 1
Numerical
+2
-0

Refer to the given 3-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ________ . (Answer in integer)

$$\begin{aligned} & \text { 1001: } \mathrm{i}=1 \\ & \text { 1002: } \mathrm{j}=1 \\ & \text { 1003: } \mathrm{t} 1=10 \text { * } \mathrm{i} \\ & \text { 1004: } \mathrm{t} 2=\mathrm{t} 1+\mathrm{j} \\ & \text { 1005: t3 }=8^* \text { t2 } \\ & \text { 1006: } \mathrm{t} 4=\mathrm{t} 3-88 \\ & \text { 1007: a[t4] }=0.0 \\ & \text { 1008: j = j + } 1 \\ & \text { 1009: if } \mathrm{j}<=10 \text { goto } 1003 \\ & \text { 1010: } \mathrm{i}=\mathrm{i}+1 \\ & \text { 1011: if } \mathrm{i}<=10 \text { goto } 1002 \\ & \text { 1012: } \mathrm{i}=1 \\ & \text { 1013: } \mathrm{t} 5=\mathrm{i}-1 \\ & \text { 1014: t6 = 88 * t5 } \\ & \text { 1015: } \mathrm{a}[\mathrm{t} 6]=1.0 \\ & \text { 1016: } i=i+1 \\ & \text { 1017: if } \mathrm{i}<=10 \text { goto } 1013 \end{aligned}$$

Your input ____
4
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

GATE CSE Subjects

Browse all chapters by subject

Software Engineering
Web Technologies