Abstract
Induction variables refer to a wide class of inductive definitions, where the sequence of values taken by a variable follows a regular pattern. The typical case is that of a loop counter. More generally, induction variables are associated with affine, geometric, or otherwise statically predictable progressions in loops. The purpose of the induction variable analysis is to provide a characterization of such sequences. There are numerous applications, from the detection of parallel loops to optimizations such as loop-invariant code motion, strength reduction, eliminating dependencies, and evaluating the number of iterations of a while loop. This chapter focuses particularly on the analysis and classification of induction variables in the presence of complex, low-level control flow (gotos, multiple loop exits, etc.). It describes the algorithm underlying the analysis of “scalar evolutions” in the GCC and LLVM compilers.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
To simplify the discussion, we consider the original program to be free of side effect instructions.
- 2.
Note, however, that the computation of closed-form expressions is not required for dependence testing itself [309].
References
Bachmann, O., Wang, P. S., & Zima, E. V. (1994). Chains of recurrences—A method to expedite the evaluation of closed-form functions. In Proceedings of the International Symposium on Symbolic and Algebraic Computation (pp. 242–249).
Banerjee, U. (1988). Dependence analysis for supercomputing. Alphen aan den Rijn: Kluwer Academic Publishers.
Kislenkov, V., Mitrofanov, V., & Zima, E. V. (1998). Multidimensional chains of recurrences. In Proceedings of the International Symposium on Symbolic and Algebraic Computation (pp. 199–206).
Pugh, W. (1991). Uniform techniques for loop optimization. In Proceedings of the International Conference on Supercomputing. ICS ’91 (pp. 341–352).
Zima, E. V. (2001). On computational properties of chains of recurrences. In Proceedings of the International Symposium on Symbolic and Algebraic Computation (pp. 345–352).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
Pop, S., Cohen, A. (2022). Loop Tree and Induction Variables. In: Rastello, F., Bouchez Tichadou, F. (eds) SSA-based Compiler Design. Springer, Cham. https://doi.org/10.1007/978-3-030-80515-9_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-80515-9_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-80514-2
Online ISBN: 978-3-030-80515-9
eBook Packages: Computer ScienceComputer Science (R0)