Beyond induction variables

Induction variable detection is usually closely tied to the strength reduction optimization. This paper studies induction variable analysis from a different perspective, that of finding induction variables for data dependence analysis. While classical induction variable analysis techniques have been used successfully up to now, we have found a simple algorithm based on the Static Single Assignment form of a program that finds all linear induction variables in a loop. Moreover, this algorithm is easily extended to find induction variables in multiple nested loops, to find nonlinear induction variables, and to classify other integer scalar assignments in loops, such as monotonic, periodic and wrap-around variables. Some of these other variables are now classified using ad hoc pattern recognition, while others are not analyzed by current compilers. Giving a unified approach improves the speed of compilers and allows a more general classification scheme. We also show how to use these variables in data dependence testing.

[1]  Richard M. Karp,et al.  The Organization of Computations for Uniform Recurrence Equations , 1967, JACM.

[2]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[3]  Ken Kennedy,et al.  An algorithm for reduction of operator strength , 1977, Commun. ACM.

[4]  Utpal Banerjee,et al.  Time and Parallel Processor Bounds for Fortran-Like Loops , 1979, IEEE Transactions on Computers.

[5]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[6]  David A. Padua,et al.  Advanced compiler optimizations for supercomputers , 1986, CACM.

[7]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[8]  Ken Kennedy,et al.  Automatic translation of FORTRAN programs to vector form , 1987, TOPL.

[9]  Charles N. Fischer,et al.  Crafting a Compiler , 1988 .

[10]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[11]  François Irigoin,et al.  Supernode partitioning , 1988, POPL '88.

[12]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.

[13]  Zhiyu Shen,et al.  An Empirical Study of Fortran Programs for Parallelizing Compilers , 1990, IEEE Trans. Parallel Distributed Syst..

[14]  Arthur B. Maccabe,et al.  The program dependence web: a representation supporting control-, data-, and demand-driven interpretation of imperative languages , 1990, PLDI '90.

[15]  Ken Kennedy,et al.  Practical dependence testing , 1991, PLDI '91.

[16]  M. Wegman,et al.  Constant propagation with conditional branches , 1991, TOPL.

[17]  Alexandru Nicolau,et al.  Advances in languages and compilers for parallel processing , 1991 .

[18]  David A. Padua,et al.  Experience in the Automatic Parallelization of Four Perfect-Benchmark Programs , 1991, LCPC.

[19]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[20]  Monica S. Lam,et al.  Efficient and exact data dependence analysis , 1991, PLDI '91.