Chapter 9: Code generation

Peephole optimization examples.

. Strength reduction

- Replace X^2 by X*X

- Replace multiplication by left shift

- Replace division by right shift

. Use faster machine instructions

replace      Add #1,R

by Inc      R