Partial redundancy elimination in SSA form

The SSAPRE algorithm for performing partial redundancy elimination based entirely on SSA form is presented. The algorithm is formulated based on a new conceptual framework, the factored redundancy graph, for analyzing redundancy, and representes the first sparse approach to the classical problem and on methods for its solution. With the algorithm description, theorems and their proofs are given showing that the algorithm produces the best possible code by the criteria of computational optimality and lifetime optimality of the introduced temporaries. In addition to the base algorithm, a practical implementation of SSAPRE that exhibits additional compile-time efficiencies is described. In closing, measurement statistics are provided that characterize the instances of the partial redundancy problem from a set of benchmark programs and compare optimization time spent by an implementation of SSAPRE aganist a classical partial redundancy elimination implementation. The data lend insight into the nature of partial redundancy elimination and demonstrate the expediency of this new approach.

[1]  Ken Kennedy Safety of code motion , 1972 .

[2]  Dhananjay M. Dhamdhere Corrigendum: a new algorithm for composite hoisting and strength reduction optimisation , 1989 .

[3]  Jong-Deok Choi,et al.  Automatic construction of sparse data flow evaluation graphs , 1991, POPL '91.

[4]  Raymond Lo,et al.  Register promotion by sparse partial redundancy elimination of loads and stores , 1998, PLDI.

[5]  Dhananjay M. Dhamdhere,et al.  A composite hoisting-strength reduction transformation for global program optimization part ii , 1982 .

[6]  Dhananjay M. Dhamdhere,et al.  How to analyze large programs efficiently and informatively , 1992, PLDI '92.

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

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

[9]  Keshav Pingali,et al.  The program structure tree: computing control regions in linear time , 1994, PLDI '94.

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

[11]  Bernhard Steffen,et al.  Optimal code motion: theory and practice , 1994, TOPL.

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

[13]  Fred C. Chow,et al.  A portable machine-independent global optimizer--design and measurements , 1984 .

[14]  Dhananjay M. Dhamdhere,et al.  Strength reduction of large expressions , 1995, J. Program. Lang..

[15]  Guang R. Gao,et al.  A linear time algorithm for placing φ-nodes , 1995, POPL '95.

[16]  Fred C. Chow Minimizing register usage penalty at procedure calls , 1988, PLDI '88.

[17]  Dhananjay M. Dhamdhere A new algorithm for composite hoisting and strength reduction optimisation , 1989 .

[18]  Keith D. Cooper,et al.  Value-driven redundancy elimination , 1996 .

[19]  Raymond Lo,et al.  Loop induction variable canonicalization in parallelizing compilers , 1996, Proceedings of the 1996 Conference on Parallel Architectures and Compilation Technique.

[20]  Walter Kirchgässner,et al.  An optimizer for Ada - design, experiences and results , 1988, PLDI '88.

[21]  Manfred P. Stadel,et al.  A solution to a problem with Morel and Renvoise's “Global optimization by suppression of partial redundancies” , 1988, TOPL.

[22]  Etienne Morel,et al.  Global optimization by suppression of partial redundancies , 1979, CACM.

[23]  Raymond Lo,et al.  Effective Representation of Aliases and Indirect Memory Operations in SSA Form , 1996, CC.

[24]  Keith D. Cooper,et al.  Value Numbering , 1997, Softw. Pract. Exp..

[25]  J. Knoop,et al.  Lazy Strength Reduction , 1993 .

[26]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[27]  Keith D. Cooper,et al.  Effective partial redundancy elimination , 1994, PLDI '94.

[28]  Raymond Lo,et al.  Strength Reduction via SSAPRE , 1998, CC.

[29]  Michael Wolfe,et al.  High performance compilers for parallel computing , 1995 .

[30]  Dhananjay M. Dhamdhere A fast algorithm for code movement optimisation , 1988, SIGP.

[31]  Michael Wolfe,et al.  Beyond induction variables: detecting and classifying sequences using a demand-driven SSA form , 1995, TOPL.

[32]  Bernhard Steffen,et al.  Lazy code motion , 1992, PLDI '92.

[33]  Incremental Computation of Static Single Assignment Form , 1996, CC.

[34]  Fred C. Chow,et al.  Engineering a RISC Compiler System , 1986, COMPCON.

[35]  Sei-ichiro Kamata,et al.  A New Algorithm for , 1999 .

[36]  Michael Wolfe,et al.  A reference chain approach for live variables , 1994 .

[37]  Cliff Click,et al.  Global code motion/global value numbering , 1995, PLDI '95.

[38]  Raymond Lo,et al.  A new algorithm for partial redundancy elimination based on SSA form , 1997, PLDI '97.

[39]  Manfred P. Stadel,et al.  A variation of Knoop, Rüthing, and Steffen's Lazy Code Motion , 1993, SIGP.