Because most of the execution time of a program is typically spend in loops, loop optimization is the main target of optimizing
and restructuring compilers. An accurate determination of induction variables and dependencies in loops is of paramount importance
to many loop optimization and parallelization techniques, such as generalized loop strength reduction, loop parallelization
by induction variable substitution, and loop-invariant expression elimination. In this paper we present a new method for induction
variable recognition. Existing methods are either ad-hoc and not powerful enough to recognize some types of induction variables,
or existing methods are powerful but not safe. The most powerful method known is the symbolic differencing method as demonstrated
by the Parafrase-2 compiler on parallelizing the Perfect Benchmarks(R). However, symbolic differencing is inherently unsafe and a compiler that uses this method may produce incorrectly transformed
programs without issuing a warning. In contrast, our method is safe, simpler to implement in a compiler, better adaptable
for controlling loop transformations, and recognizes a larger class of induction variables.
This work was supported in part by NSF grant CCR-9904943