Torben Ægidius Mogensen's "Basics of Compiler Design, Chapter 11: Analysis and Optimisation"
Do Exercise 11.1 parts a) and b) on page 254.
This exercise will give you some practice with code optimization and is based on Chapter 11, which covers analysis and optimization. The exercise uses common subexpression elimination as an example of optimization. You can check your answers against the Answer Key.
Click http://web.archive.org/web/20120915222417/http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/basics_lulu2.pdf link to open resource.