Back to the 2023 paper

Module 4 : Intermediate Code Generation & Code Improvement

20238m

Consider the following code:
(i) i = 12
(ii) j = 1
(iii) t1 = 10 * i
(iv) t2 = t1 + j
(v) t3 = 8 * t2
(vi) t4 = t3 - 88
(vii) a [ t4 ] = 0.0
(viii) j = j + 1
(ix) if j <= 10 goto (iii)
(x) i = i + 1
(xi) if i <= 10 goto (ii)
(xii) i = 1
(xiii) t5 = i - 1
(xiv) t6 = 88 * t5
(xv) a [ t6 ] = 1.0
(xvi) i = i + 1
(xvii) if i <= 10 goto (xiii)

find out the basic block and draw the flow graph for the above code.

Similar questions