Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Solution

1.
Copy Propagation
x=z
y=4+z
Then, Dead Code elimination
y=4+z

2.
Constant Folding
void f()
{
return 8;
}

3.
Constant Folding
x=3
y=4+3
Constant Folding, Dead code elimination
y=7

4.
Common Sub expression elimination

You might also like