## A New Algorithm for Partial Redundancy Elimination based on SSA Form (1997)

### Cached

### Download Links

- [reality.sgi.com]
- [www.cs.colorado.edu]
- [sol.cs.trinity.edu]
- [sol.cs.trinity.edu]
- [www.cs.trinity.edu]
- DBLP

### Other Repositories/Bibliography

Citations: | 65 - 3 self |

### BibTeX

@INPROCEEDINGS{Chow97anew,

author = {Fred Chow and Sun Chan and Robert Kennedy and Shin-ming Liu and Raymond Lo and Peng Tu},

title = {A New Algorithm for Partial Redundancy Elimination based on SSA Form},

booktitle = {},

year = {1997},

pages = {273--286}

}

### OpenURL

### Abstract

A new algorithm, SSAPRE, for performing partial redundancy elimination based entirely on SSA form is presented. It achieves optimal code motion similar to lazy code motion [KRS94a, DS93], but is formulated independently and does not involve iterative data flow analysis and bit vectors in its solution. It not only exhibits the characteristics common to other sparse approaches, but also inherits the advantages shared by other SSA-based optimization techniques. SSAPRE also maintains its output in the same SSA form as its input. In describing the algorithm, we state theorems with proofs giving our claims about SSAPRE. We also give additional description about our practical implementation of SSAPRE, and analyze and compare its performance with a bit-vector-based implementation of PRE. We conclude with some discussion of the implications of this work. 1 Introduction The Static Single Assignment Form (SSA) has become a popular program representation in optimizing compilers, because it provid...

### Citations

839 | Efficiently Computing Static Single Assignment Form and version 1 - Cytron, Ferrante, et al. - 1991 |

653 | High Performance Compilers for Parallel Computing - Wolfe - 1995 |

308 | Constant Propagation with Conditional Branches
- Wegman, Zadeck
- 1991
(Show Context)
Citation Context ...form [CFR + 91, Wol96, CCL + 96]. Many efficient global optimization algorithms have been developed based on SSA. Among these optimizations are dead store elimination [CFR + 91], constant propagation =-=[WZ91]-=-, value numbering [AWZ88, RWZ88, CS95a], induction variable analysis [GSW95, LLC96], live range computation [GWS94] and global code motion [Cli95]. All these uses of SSA have been restricted to solvin... |

173 | Global value numbers and redundant computations - Rosen, Wegman, et al. - 1988 |

157 | Lazy code motion
- Knoop, Ruething, et al.
- 1992
(Show Context)
Citation Context ... of a + b are replaced by t. The \Phi's for h are translated into OE's for t in the native program representation. 4 SSAPRE Algorithm In this section, we describe the complete SSAPRE algorithm. As in =-=[KRS92]-=- and [DS93], we assume all critical edges in the control flow graph have been removed by inserting empty basic blocks at such edges. This allows us to model insertions as edge placements, even though ... |

113 |
Automatic Construction of Sparse Data Flow Evaluation Graphs
- Choi, Cytron, et al.
- 1991
(Show Context)
Citation Context ...lied using SSAPRE as a model. 2 Related Work In recent years, we have seen development of different techniques aimed at improving the solution of data flow problems that are related to SSA or PRE. In =-=[CCF91]-=-, by generalizing SSA form, Choi et al. derived Sparse Evaluation Graphs as reduced forms of the original flow graph for monotone data flow problems related to variables. The technique must construct ... |

112 | Optimal code motion: Theory and practice
- Knoop, Rüthing, et al.
- 1994
(Show Context)
Citation Context ...he corresponding operand of that \Phi. 2 4.3 The DownSafety Step One criterion required for PRE to insert a computation is that the computation is down-safe (or anticipated) at the point of insertion =-=[KRS94a]-=-. In the dense SSA graph constructed by Rename, each node either represents a real occurrence of the expression or is a \Phi. It can be shown that SSAPRE insertions are only necessary at \Phi's, so do... |

102 | Beyond induction variables: Detecting and classifying sequences using a demand-driven SSA form
- Gerlek, Stoltz, et al.
- 1995
(Show Context)
Citation Context ... operands; the SSA versions of the variables are ignored in matching expressions. For example, a1 + b1 and a2 + b2 are lexically identical expressions. 2 Our SSA graph is similar to that described in =-=[GSW95]-=-, which is formed from the use-def edges of nodes assigned the same SSA version. The sparse computation of global data flow attributes for a + b can be performed on the dense SSA graph for h. Two sepa... |

91 | Partial dead code elimination - Knoop, Ruthing, et al. |

85 | Effective partial redundancy elimination
- Briggs, Cooper
- 1994
(Show Context)
Citation Context ...te the expression tree when no optimization opportunity was found with the original form. This last possibility represents a different approach for addressing the code shape issue in PRE discussed in =-=[BC94]-=-. We intend to report on any interesting results in future publications. Acknowledgement The authors would like to thank Ash Munshi, Ron Price and Ross Towle for their support of this work in the MIPS... |

76 | Minimizing Register Usage Penalty at Procedure Calls - Chow |

67 |
A portable machine-independent global optimizer—Design and measurements
- Chow
- 1983
(Show Context)
Citation Context ...Graphics MIPSpro Compilers. The optimizer uses a variant of SSA called HSSA as its internal program representation [CCL + 96]. The optimizer had used the bit-vector-based Morel and Renvoise algorithm =-=[Cho83]-=- to perform PRE, while it uses known SSA-based algorithms for its other optimizations. In Release 7.2 of the compiler, we have re-implemented the PRE phase using SSAPRE, incorporating the techniques w... |

56 |
How to Analyze Large Programs Efficiently and Informatively
- Dhamdhere, Rosen, et al.
- 1992
(Show Context)
Citation Context ...ocal versions of an optimization simultaneously. The amount of effort required to implement each optimization can be correspondingly reduced. As was hinted at by Dhamdhere et al. in the conclusion of =-=[DRZ92]-=-, developing a PRE algorithm based on SSA is difficult because an expression E can be redundant as the result of many different computations at different places of the same expression E 0 , E 00 , . .... |

56 | The program structure tree: Computing control regions in linear time - Johnson, Pearson, et al. - 1994 |

54 | Value numbering - Briggs, Cooper, et al. - 1994 |

41 | Effective representation of aliases and indirect memory operations in SSA form - Chow, Chan, et al. - 1996 |

28 |
A variation of knoop, ruthing, and steffen’s lazy code motion
- Drechsler, Stadel
- 1993
(Show Context)
Citation Context ... flow equations. The result of lazy code motion is optimal: the number of computations cannot be further reduced by safe code motion, and the lifetimes of the temporaries introduced are minimized. In =-=[DS93]-=-, Drechsler and Stadel gave a simpler version of the lazy code motion algorithm that inserts computations on edges rather than in nodes. Optimizations based on SSA all share the common characteristic ... |

23 | Lazy Strength Reduction - Knoop, Ruthing, et al. - 1993 |

22 |
Global code motion global value numbering
- Click
- 1995
(Show Context)
Citation Context ...ead store elimination [CFR + 91], constant propagation [WZ91], value numbering [AWZ88, RWZ88, CS95a], induction variable analysis [GSW95, LLC96], live range computation [GWS94] and global code motion =-=[Cli95]-=-. All these uses of SSA have been restricted to solving problems based on program variables, since the concept of use-def does not readily apply to expressions. Noticeably missing among SSA-based opti... |

19 | Detecting equality of values in programs - Alpern, Wegman, et al. - 1988 |

19 |
Global optimization by supression of partial redundancies
- Morel, Renviose
(Show Context)
Citation Context ...ns. Noticeably missing among SSA-based optimizations is partial redundancy elimination. Partial redundancy elimination (PRE) is a powerful optimization algorithm first developed by Morel and Renvoise =-=[MR79]-=-. By targeting partially redundant computations in the program, it automatically removes global common subexpressions and moves invariant computations out of loops. It has since become the most import... |

19 | A linear time algorithm for placing OEnodes - Sreedhar, Gao - 1995 |

15 | A new algorithm for composite hoisting and strength reduction optimisation - Dhamdhere - 1989 |

13 |
Incremental computation of static single assignment form
- Choi, Sarkar, et al.
- 1996
(Show Context)
Citation Context ...r PRE Figure 1: PRE in SSA form mizations, it is necessary to convert the results of PRE back into SSA form, and such incremental updates based on arbitrary modifications to the program are expensive =-=[CSS96]-=-. We have developed an algorithm that performs PRE directly on an SSA representation of the program (SSAPRE). Our algorithm is sparse because it does not require collecting traditional local data flow... |

13 | An optimizer for Ada - design, experiences and results - Schwarz, Kirchgassner, et al. - 1988 |

9 | Loop Induction Variable Canonicalization in Parallelizing Compilers - Liu, Lo, et al. - 1996 |

8 |
Efficient program analysis using dependence flow graphs
- Johnson
- 1995
(Show Context)
Citation Context ...ol flow graph of the program. The approach can be used in place of the iterative solution of any monotone data flow problem as formulated. It can be used to speed up the data flow analyses in PRE. In =-=[Joh94], Johnson -=-proposed the use of Dependence Flow Graphs (DFG) as a sparse approach to speed up data flow analysis. The DFG of a variable can be viewed as its SSA graph with additional "merge" operators i... |

6 | Value-driven code motion - Cooper, Simpson - 1995 |

5 | A Reference Chain Approach for Live Variables
- GERLEK, WOLFE, et al.
- 1994
(Show Context)
Citation Context ...Among these optimizations are dead store elimination [CFR + 91], constant propagation [WZ91], value numbering [AWZ88, RWZ88, CS95a], induction variable analysis [GSW95, LLC96], live range computation =-=[GWS94]-=- and global code motion [Cli95]. All these uses of SSA have been restricted to solving problems based on program variables, since the concept of use-def does not readily apply to expressions. Noticeab... |

3 | Engineering a RISC compiler - Chow, Himelstein, et al. - 1986 |

2 | Lazy code motion - Riithing, Steffen - 1992 |

1 | Engineering a rise compiler - Chow |

1 | Cho88] [Cli95] [CSSSa] [CS95b] [CSSSS] [Dha89] [DRZ92] [DS93] [GSW95] [GWS94] F. Chow. Minimizing register usage penalty at procedure calls - University - 1988 |

1 | Lazy strength reduction - Riithing, Steffen - 1993 |

1 | Partial dead code elimination - Riithing, Steffen - 1994 |

1 | A linear time algorithm for placing h-nodes - Sreedhar, Gao - 1995 |