Partial Redundancy Elimination on Predicated Code

Partial redundancy elimination (PRE) is one of the most important and widespread optimizations in compilers. However, current PRE-techniques are inadequate to handle predicated code, i.e., programs where instructions are guarded by a 1-bit register that dynamically controls whether the effect of an instruction should be committed or nullified. In fact, to exclude corrupting the semantics they must be overly conservative making them close to useless. Since predicated code will be more and more common with the advent of the IA-64 architecture, we present here a family of PRE-algorithms tailored for predicated code. Conceptually, the core element of this family can be considered the counterpart of busy code motion of [17]. It can easily be tuned by two orthogonal means. First, by adjusting the power of a preprocess feeding it by information on predication. Second, by relaxing or strengthening the constraints on synthesizing predicates controlling the movability of computations. Together with extensions towards lazy code motion, this results in a family of PRE-algorithms spanning a range from tamed to quite aggressive algorithms, which is illustrated by various meaningful examples.

[1]  Bernhard Steffen,et al.  The Value Flow Graph: A Program Representation for Optimal Program Transformations , 1990, ESOP.

[2]  Scott Mahlke,et al.  Effective compiler support for predicated execution using the hyperblock , 1992, MICRO 1992.

[3]  Scott A. Mahlke,et al.  Reverse If-Conversion , 1993, PLDI '93.

[4]  Barry K. Rosen,et al.  Qualified Data Flow Problems , 1981, IEEE Trans. Software Eng..

[5]  Bernhard Steffen,et al.  Optimal Run Time Optimization Proved by a New Look at Abstract Interpretation , 1987, TAPSOFT, Vol.1.

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

[7]  Dirk Grunwald,et al.  A system level perspective on branch architecture performance , 1995, Proceedings of the 28th Annual International Symposium on Microarchitecture.

[8]  Bernhard Steffen,et al.  Partial dead code elimination , 1994, PLDI '94.

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

[10]  Rajiv Gupta,et al.  Path profile guided partial redundancy elimination using speculation , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[11]  Jens Knoop Optimal Interprocedural Program Optimization: A New Framework and Its Application , 1999 .

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

[13]  Oliver Rüthing,et al.  Bidirectional Data Flow Analysis in Code Motion: Myth and Reality , 1998, SAS.

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

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

[16]  Bernhard Steffen,et al.  The power of assignment motion , 1995, PLDI '95.

[17]  Bernhard Steffen,et al.  Sparse code motion , 2000, POPL '00.

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

[19]  Rajiv Gupta,et al.  Register Pressure Sensitive Redundancy Elimination , 1999, CC.

[20]  D. B. Davis,et al.  Intel Corp. , 1993 .

[21]  Jesse Zhixi Fang,et al.  Compiler Algorithms on If-Conversion, Speculative Predicates Assignment and Predicated Code Optimizations , 1996, LCPC.

[22]  Richard Johnson,et al.  Analysis techniques for predicated code , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[23]  Carole Dulong,et al.  The IA-64 Architecture at Work , 1998, Computer.

[24]  Rajiv Gupta,et al.  Path profile guided partial dead code elimination using predication , 1997, Proceedings 1997 International Conference on Parallel Architectures and Compilation Techniques.

[25]  Matthew S. Hecht,et al.  Flow Analysis of Computer Programs , 1977 .

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

[27]  Jens Knoop,et al.  Optimization Under the Perspective of Soundness, Completeness, and Reusability , 1999, Correct System Design.

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

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

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

[31]  Ken Kennedy,et al.  Conversion of control dependence to data dependence , 1983, POPL '83.

[32]  Rastislav Bodík,et al.  Path-sensitive value-flow analysis , 1998, POPL '98.

[33]  Roy Dz-Ching Ju,et al.  Global predicate analysis and its application to register allocation , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[34]  Bernhard Steffen,et al.  Code motion for explicitly parallel programs , 1999, PPoPP '99.

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

[36]  Bernhard Steffen,et al.  Code Motion and Code Placement: Just Synonyms? , 1998, ESOP.

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

[38]  Oliver Rüthing,et al.  Optimal Code Motion in the Presence of Large Expressions , 1998, ICCL.

[39]  R. N. Horspool,et al.  Partial redundancy elimination driven by a cost-benefit analysis , 1997, Proceedings of the Eighth Israeli Conference on Computer Systems and Software Engineering.