A basic compiler optimization is known as 'loop unrolling. The assumptions and knowledge required to understand this concept will serve as quite useful in other, more advanced topics of optimization. While quite straight-forward, the technique is very powerful, as we will show.

Table of Contents:

  1. Why do it?
  2. High- and low-level unrolling.
  3. A short example.
  4. The example continued.
  5. Rescheduling -- avoiding stalls.
  6. A longer example.
  7. Final thoughts.
  8. Self-test.
  9. Glossary of terms.