Loop Tree and Induction Variables

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 p...

Full description

Saved in:
Bibliographic Details
Published inSSA-based Compiler Design pp. 123 - 133
Main Authors Pop, Sebastian, Cohen, Albert
Format Book Chapter
LanguageEnglish
Published Cham Springer International Publishing 2022
Subjects
Online AccessGet full text
ISBN303080514X
9783030805142
DOI10.1007/978-3-030-80515-9_10

Cover

More Information
Summary: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.
ISBN:303080514X
9783030805142
DOI:10.1007/978-3-030-80515-9_10