## Effective Partial Redundancy Elimination (1994)

Venue: | Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation |

Citations: | 85 - 13 self |

### BibTeX

@INPROCEEDINGS{Briggs94effectivepartial,

author = {Preston Briggs and Keith D. Cooper},

title = {Effective Partial Redundancy Elimination},

booktitle = {Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation},

year = {1994},

pages = {159--170}

}

### Years of Citing Articles

### OpenURL

### Abstract

Partial redundancy elimination is a code optimization with a long history of literature and implementation. In practice, its effectiveness depends on issues of naming and code shape. This paper shows that a combination of global reassociation and global value numbering can increase the effectiveness of partial redundancy elimination. By imposing a discipline on the choice of names and the shape of expressions, we are able to expose more redundancies. As part of the work, we introduce a new algorithm for global reassociation of expressions. It uses global information to reorder expressions, creating opportunities for other optimizations. The new algorithm generalizes earlier work that ordered FORTRAN array address expressions to improve optimization [25]. 1 Introduction Partial redundancy elimination is a powerful optimization that has been discussed in the literature for many years (e.g., [21, 8, 14, 12, 18]). Unfortunately, partial redundancy elimination has two serious limitations...

### Citations

840 | Efficiently computing static single assignment form and the control dependence graph
- CYTRON, FERRANTE, et al.
- 1991
(Show Context)
Citation Context ...p. In practice, we compute ranks on the SSA form of the routine during a reversepostorder traversal of the control-flow graph; therefore, our first step is to build the pruned SSA form of the routine =-=[11, 7]-=-. During the renaming step [11, Figure 12], we remove all copies, effectively folding them into OE-nodes. This approach simplifies the intermediate code by removing our dependence on the programmer's ... |

705 | A data locality optimizing algorithm
- Wolf, Lam
- 1991
(Show Context)
Citation Context ...in this paper. Reassociation should let strength reduction introduce fewer distinct induction variables, particularly in code with complex subscripts like that produced by cache and register blocking =-=[5, 27]-=-. Of course, some particularly sophisticated approaches to strength reduction include a form of reassociation [20]; we believe that a separate pass of reassociation will significantly simplify the imp... |

308 | Constant Propagation with Conditional Branches
- Wegman, Zadeck
- 1991
(Show Context)
Citation Context ...r four different levels of optimization: baseline This column provides the dynamic operation count, including branches, for each routine when optimized using a sequence of global constant propagation =-=[26]-=-, global peephole optimization, global dead code elimination [11, Section 7.1], coalescing, and a final pass to eliminate empty basic blocks. 1 partial The left column gives the operation counts for r... |

218 |
Detecting equality of variables in programs
- Alpern, Wegman, et al.
- 1988
(Show Context)
Citation Context ...t end dictate the effectiveness of partial redundancy elimination. This paper shows how an optimizer can use global reassociation (see Section 3.1) and a form of partitionbased global value numbering =-=[2]-=- to improve the effectiveness of partial redundancy elimination. We consider these to be enabling transformations. They do not imThis work has been supported by ARPA through ONR grant N00014-91-J-1989... |

193 |
Register allocation via coloring
- Chaitin, Auslander, et al.
- 1981
(Show Context)
Citation Context ... the loop and the redundant computations of r 3 ; r 6 , and r 7 have been removed. Finally, the coalescing phase of a Chaitin-style global register allocator will remove unnecessary copy instructions =-=[6]-=-. In this example, coalescing is able to remove all the copies (as shown in Figure 10), though this will not always be possible. Taken together, the sequence of transformations reduced the length of t... |

179 |
Global Optimizations by Suppression of Partial Redundancies
- Morel, Renvoise
- 1979
(Show Context)
Citation Context ...ORTRAN array address expressions to improve optimization [25]. 1 Introduction Partial redundancy elimination is a powerful optimization that has been discussed in the literature for many years (e.g., =-=[21, 8, 14, 12, 18]-=-). Unfortunately, partial redundancy elimination has two serious limitations. It can only recognize lexically-identical expressions; this makes effectiveness a function of the choice of names in the f... |

173 |
Global value numbers and redundant computations
- Rosen, Wegman, et al.
- 1988
(Show Context)
Citation Context ...on the deficiencies discussed in Sections 2.2 and 2.3. Rosen et al. recognize the naming problem and propose a complex alternative to PRE; however, they do not consider reordering complex expressions =-=[23]-=-. The idea of exploiting associativity and distributivity to rearrange expressions is well known [17, 1]; however, early work concentrated on simplifying individual expressions. We know of two prior a... |

157 | Lazy code motion
- Knoop, Ruething, et al.
- 1992
(Show Context)
Citation Context ...ORTRAN array address expressions to improve optimization [25]. 1 Introduction Partial redundancy elimination is a powerful optimization that has been discussed in the literature for many years (e.g., =-=[21, 8, 14, 12, 18]-=-). Unfortunately, partial redundancy elimination has two serious limitations. It can only recognize lexically-identical expressions; this makes effectiveness a function of the choice of names in the f... |

113 |
Automatic Construction of Sparse Data Flow Evaluation Graphs
- Choi, Cytron, et al.
- 1991
(Show Context)
Citation Context ...p. In practice, we compute ranks on the SSA form of the routine during a reversepostorder traversal of the control-flow graph; therefore, our first step is to build the pruned SSA form of the routine =-=[11, 7]-=-. During the renaming step [11, Figure 12], we remove all copies, effectively folding them into OE-nodes. This approach simplifies the intermediate code by removing our dependence on the programmer's ... |

109 |
Cornputer Methods for Mathematical Computations
- Forsythe, Malcolm, et al.
- 1977
(Show Context)
Citation Context ...utines. Each version adds new passes to the previous one. Our test suite consists of 50 routines, drawn from the Spec benchmark suite and from Forsythe, Malcolm, and Moler's book on numerical methods =-=[16]-=-. The results are given in Table 1. We report results for four different levels of optimization: baseline This column provides the dynamic operation count, including branches, for each routine when op... |

91 | Partial dead code elimination
- Knoop, Ruthing, et al.
(Show Context)
Citation Context ...serting copies. New blocks were required to hold the copies. Figure 6 shows the effect of forward propagation. It is interesting to note that forward propagation eliminates partially-dead expressions =-=[15, 19]-=-. An expression is live at its definition point if its result is used on some path to an exit. Alternatively, an expression is dead if its result will never be used on any path. By copying expressions... |

72 |
Programming languages and their compilers; preliminary notes
- Cocke, Schwartz
- 1970
(Show Context)
Citation Context ...+ rz rb / r2 Obviously, r 1 and r 2 receive the same value (that is, the expression named by r 2 is redundant). PRE cannot discover this fact even though value numbering can eliminate this redundancy =-=[10]-=-. Of course, this is a simple example, but its very simplicity should suggest the large number of opportunities missed by PRE when considering an entire routine. 3 Effective PRE To address the limitat... |

67 |
A portable machine-independent global optimizerâ€”Design and measurements
- Chow
- 1983
(Show Context)
Citation Context ...ORTRAN array address expressions to improve optimization [25]. 1 Introduction Partial redundancy elimination is a powerful optimization that has been discussed in the literature for many years (e.g., =-=[21, 8, 14, 12, 18]-=-). Unfortunately, partial redundancy elimination has two serious limitations. It can only recognize lexically-identical expressions; this makes effectiveness a function of the choice of names in the f... |

47 |
Practical adaption of the global optimization algorithm of Morel and Renvoise
- Dhamdhere
- 1991
(Show Context)
Citation Context |

40 |
An overview of the PL.8 compiler
- Auslander, Hopkins
- 1982
(Show Context)
Citation Context ... to see it named r 2 . This naming discipline can be implemented in the compiler's front end by maintaining a hash table of expressions and creating a new name whenever a new expression is discovered =-=[3]-=-. Unfortunately, relying on the front end limits the applicability of PRE. It is difficult to maintain the naming rules across other optimizations; thus, PRE must be run first and only once. Furthermo... |

38 |
A solution to a problem with morel and renvoise's "global optimization by suppression of partial redudancies
- Drechsler, Stadel
- 1988
(Show Context)
Citation Context |

37 | Blocking Linear Algebra Codes for Memory Hierarchies
- Carr, Kennedy
- 1989
(Show Context)
Citation Context ...in this paper. Reassociation should let strength reduction introduce fewer distinct induction variables, particularly in code with complex subscripts like that produced by cache and register blocking =-=[5, 27]-=-. Of course, some particularly sophisticated approaches to strength reduction include a form of reassociation [20]; we believe that a separate pass of reassociation will significantly simplify the imp... |

28 |
Multiplication by integer constants
- Bernstein
- 1986
(Show Context)
Citation Context ...ther Optimizations Some optimizations interact poorly with our technique. For example, many compilers replace an integer multiply with one constant argument by a series of shifts, adds, and subtracts =-=[4]-=-. Since shifts are not associative, this optimization should not be performed until after global reassociation. For example, if ((x \Theta y) \Theta 2) \Theta z is prematurely converted into ((x \Thet... |

18 | Complexity of bi-directional data flow analysis
- Dhamdhere, Khedker
(Show Context)
Citation Context .... Their formulation supports edge placement for enhanced optimization and simplifies the data-flow equations that must be solved, avoiding the bidirectional equations typical of some other approaches =-=[13]-=-. Our implementation of global value numbering uses the simplest variation described by Alpern, Wegman, and Zadeck, possibly missing some opportunities discovered by their more powerful approaches [2,... |

10 |
The revival transformation
- Feigen, Klappholz, et al.
- 1994
(Show Context)
Citation Context ...serting copies. New blocks were required to hold the copies. Figure 6 shows the effect of forward propagation. It is interesting to note that forward propagation eliminates partially-dead expressions =-=[15, 19]-=-. An expression is live at its definition point if its result is used on some path to an exit. Alternatively, an expression is dead if its result will never be used on any path. By copying expressions... |

9 |
Measurement of program improvement algorithms
- Cocke, Markstein
(Show Context)
Citation Context ... a sum of products and associating the sum to expose the loop-invariant parts [25]. Cocke and Markstein also mention the idea of reassociation, this time within the optimizer instead of the front end =-=[9]-=-. In a chapter for an upcoming book, Markstein et al. describe a sophisticated algorithm for strength reduction that includes a form of reassociation [20]. Their algorithm attacks the problem on a loo... |

7 |
Advanced compiler technology for the RISC System/6000 architecture
- O'Brien, Hay, et al.
- 1990
(Show Context)
Citation Context ...me their approach is a development of earlier work within IBM. Other work by O'Brien et al. and Santhanam briefly describe what are apparently further developments of the Cocke and Markstein approach =-=[22, 24]-=-. It is difficult to compare our approach directly to these earlier methods. We were motivated by a desire to separate concerns. We already had solutions to hoisting loop invariants and strength reduc... |

6 |
Improved optimization of Fortran object programs
- Scarborough, Kolsky
- 1980
(Show Context)
Citation Context ...l information to reorder expressions, creating opportunities for other optimizations. The new algorithm generalizes earlier work that ordered FORTRAN array address expressions to improve optimization =-=[25]-=-. 1 Introduction Partial redundancy elimination is a powerful optimization that has been discussed in the literature for many years (e.g., [21, 8, 14, 12, 18]). Unfortunately, partial redundancy elimi... |

4 |
Expression optimization using unary complement operators
- Frailey
- 1970
(Show Context)
Citation Context ... Given ranks and expression trees, we are almost ready to reassociate expressions. First, though, we rewrite certain operations to expose more opportunities for reassociation. As suggested by Frailey =-=[17]-=-, we rewrite expressions of the form x \Gamma y +z as x + (\Gammay) + z, since addition is associative and subtraction is not. We also perform similar transformations for Boolean operations. On the ot... |

2 |
Register reassociation in PA-RISC compilers
- Santhanam
- 1992
(Show Context)
Citation Context ...me their approach is a development of earlier work within IBM. Other work by O'Brien et al. and Santhanam briefly describe what are apparently further developments of the Cocke and Markstein approach =-=[22, 24]-=-. It is difficult to compare our approach directly to these earlier methods. We were motivated by a desire to separate concerns. We already had solutions to hoisting loop invariants and strength reduc... |

1 |
Zadeck. Reassociation and strength reduction
- Markstein, Markstein, et al.
(Show Context)
Citation Context ... in code with complex subscripts like that produced by cache and register blocking [5, 27]. Of course, some particularly sophisticated approaches to strength reduction include a form of reassociation =-=[20]-=-; we believe that a separate pass of reassociation will significantly simplify the implementation of strength reduction. Additionally, implementing global reassociation as a separate pass provides ben... |