next up previous
Next: A complete exercise Up: Compiler Theory: Code Optimization Previous: Invariant Code Motion

Induction Variables

A BASIC INDUCTION VARIABLE of a loop is a variable b defined in a statement of the form b := b + n or b := b - n where Knowing the induction variables is very useful. For instance, they may allow us to replace multiplication by addition (often by a constant)


REPLACING MULTIPLICATIONS BY ADDITIONS can be performed by the following algorithms.


next up previous
Next: A complete exercise Up: Compiler Theory: Code Optimization Previous: Invariant Code Motion
Marc Moreno Maza
2004-12-02