Next: Exercise 3.
Up: Quiz8
Previous: Exercise 1.
Consider the following threeaddress code fragment.
L0 
a := 15 

b := 12 
L1 
d := a  b 

if d = 0 goto L5 
L2 
if d > 0 goto L4 
L3 
b := a  b 

b :=  b 

goto L1 
L4 
a := a  b 

goto L1 
L5 
g := b 
 Give the flow graph of this program.
 Identify the back edges and the loops.
 Is there any propagation of a copy statement that can be
performed. Justify your answer briefly.
 Explain how the techniques developed in the course
can help discover that two arithmetic operations of the above program
can be eliminated (and replaced by a copy statement).
 After this transformation, is there any propagation of a
copy statement that can be performed?
Answer 2
Next: Exercise 3.
Up: Quiz8
Previous: Exercise 1.
Marc Moreno Maza
20041202