Enabling Sparse Constant Propagation of Array Elements via Array SSA Form
We present a new static analysis technique based on Array SSA form . Compared to traditional SSA form, the key enhancement in Array SSA form is that it deals with arrays at the element level instead of as monolithic objects. In addition, Array SSA form improves the φ function used for merging scalar or array variables in traditional SSA form. The computation of a φ function in traditional SSA form depends on the program’s control flow in addition to the arguments of the φ function. Our improved φ function (referred to as a φ function) includes the relevant control flow information explicitly as arguments through auxiliary variables that are called @ variables.
The @ variables and φ functions were originally introduced as run-time computations in Array SSA form. In this paper, we use the element-level φ functions in Array SSA form for enhanced static analysis. We use Array SSA form to extend past algorithms for Sparse Constant propagation (SC) and Sparse Conditional Constant propagation (SCC) by enabling constant propagation through array elements. In addition, our formulation of array constant propagation as a set of data flow equations enables integration with other analysis algorithms that are based on data flow equations.
Keywordsstatic single assignment (SSA) form constant propagation conditional constant propagation Array SSA form unreachable codeelimination
Unable to display preview. Download preview PDF.
- 1.A.V. Aho, R. Sethi, and J.D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.Google Scholar
- 2.Cliff Click and Keith D. Cooper. Combining Analyses, Combining Optimizations. ACM Transactions on Programming Languages and Systems, 17(2):181–196, March 1995.Google Scholar
- 3.The Standard Performance Evaluation Corporation. SPEC CPU95 Benchmarks. http://open.specbench.org/osg/cpu95/, 1997.
- 4.Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Efficiently Computing Static Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems, 13(4):451–490, October 1991.Google Scholar
- 5.Matthew S. Hecht. Flow Analysis of Computer Programs. Elsevier North-Holland, Inc., 1977.Google Scholar
- 6.Kathleen Knobe and Vivek Sarkar. Array SSA form and its use in Parallelization. Conf. Rec. Twenty-fifth ACM Symposium on Principles of Programming Languages, San Diego, California, January 1998.Google Scholar
- 8.Mark N. Wegman and F. Kenneth Zadeck. Constant Propagation with Conditional Branches. ACM Transactions on Programming Languages and Systems, 13(2):181–210, April 1991.Google Scholar