Dependence-based program analysis

Program analysis and optimization can be speeded up through the use of the dependence flow graph (DFG), a representation of program dependences which generalizes def-use chains and static single assignment (SSA) form. In this paper, we give a simple graph-theoretic description of the DFG and show how the DFG for a program can be constructed in O(EV) time. We then show how forward and backward dataflow analyses can be performed efficiently on the DFG, using constant propagation and elimination of partial redundancies as examples. These analyses can be framed as solutions of dataflow equations in the DFG. Our construction algorithm is of independent interest because it can be used to construct a program's control dependence graph in O(E) time and its SSA representation in O(EV) time, which are improvements over existing algorithms.

[1]  Dhananjay M. Dhamdhere Practical adaption of the global optimization algorithm of Morel and Renvoise , 1991, TOPL.

[2]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

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

[4]  Keshav Pingali,et al.  Dependence flow graphs: an algebraic approach to program dependencies , 1991, POPL '91.

[5]  Robert M. Shapiro,et al.  THE REPRESENTATION OF ALGORITHMS , 1969 .

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

[7]  John H. Reif Symbolic program analysis in almost linear time , 1978, POPL '78.

[8]  Robert E. Tarjan,et al.  Symbolic Program Analysis in Almost-Linear Time , 1982, SIAM J. Comput..

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

[10]  Gary A. Kildall,et al.  A unified approach to global program optimization , 1973, POPL.

[11]  Vivek Sarkar,et al.  Compact representations for control dependence , 1990, PLDI '90.

[12]  Matthias Felleisen,et al.  The semantics of program dependence , 1989, PLDI '89.

[13]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[14]  M. Gell A SCHEMATIC MODEL OF BARYONS AND MESONS , 1964 .

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

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

[17]  R. Parsons-Selke,et al.  A rewriting semantics for program dependence graphs , 1989, POPL '89.

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

[19]  Thomas W. Reps,et al.  On the adequacy of program dependence graphs for representing programs , 1988, POPL '88.

[20]  Mark N. Wegman,et al.  An efficient method of computing static single assignment form , 1989, POPL '89.

[21]  Keshav Pingali,et al.  From Control Flow to Dataflow , 1991, J. Parallel Distributed Comput..

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

[23]  Arthur B. Maccabe,et al.  The program dependence web: a representation supporting control-, data-, and demand-driven interpretation of imperative languages , 1990, PLDI '90.