2081.1 3

Compiler Design and Construction2081.110 marksNumerical: basic blocks and control flowBasic blocks and flow graphs

Explain the optimization techniques for code optimization. Convert the following program to basic block and control flow. M = A + B N = C + D textIF (M > N) rightarrow X = M - N; textELSE E = M + N + X

Explain the optimization techniques for code optimization. Convert the following program to basic block and control flow.

$M = A + B$

$N = C + D$

$\text{IF } (M > N) \rightarrow X = M - N;$

$\text{ELSE } E = M + N + X$

[10]

Program statements: (The repeated LaTeX text M=A+B, N=C+D etc. is just rendering duplication; the actual program has one statement each for M and N.) --- Code optimization transforms a program so it runs faster and/or uses less memory without changing its meaning (output). Techniques are broadly ...

Up nextCompute the FIRST and FOLLOW of all the non-terminals in following grammar. S→ABS \rightar