Next: Exercise 9.
Up: Final-13-04-2004
Previous: Exercise 7.
We consider the following basic block
a := b + c
z := a * a
x := 0
y := b + c
w := y * y
u := x + 3
v := u + v
Assume that only v and z are live at the exit of this block.
Applying the following optimizations
- common sub-expressions elimination
- copy propagation
- dead code elimination
explain how the above basic block can be transformed
into another one which has only 3 TAC statements.
Note that each optimization can be applied several times.
Answer 8
![\fbox{
\begin{minipage}{13 cm}
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \...
...\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\end{minipage}}](img72.png)
Next: Exercise 9.
Up: Final-13-04-2004
Previous: Exercise 7.
Marc Moreno Maza
2004-12-02