Chapter 9: Code generation

Example .

The six temporaries in the basic block can be packed into two locations. These locations correspond to t 1 and t 2 in:

1: t 1 = a * a

2: t 2 = a * b

3: t2 = 2 * t2

4: t1 = t 1 + t2

5: t2 = b * b

6: t1 = t1 + t 2

7: X = t1