The program dependence graph and its use in optimization

In this paper we present an intermediate program representation, called the program dependence graph (PDG), that makes explicit both the data and control dependences for each operation in a program. Data dependences have been used to represent only the relevant data flow relationships of a program. Control dependences are introduced to analogously represent only the essential control flow relationships of a program. Control dependences are derived from the usual control flow graph. Many traditional optimizations operate more efficiently on the PDG. Since dependences in the PDG connect computationally related parts of the program, a single walk of these dependences is sufficient to perform many optimizations. The PDG allows transformations such as vectorization, that previously required special treatment of control dependence, to be performed in a manner that is uniform for both control and data dependences. Program transformations that require interaction of the two dependence types can also be easily handled with our representation. As an example, an incremental approach to modifying data dependences resulting from branch deletion or loop unrolling is introduced. The PDG supports incremental optimization, permitting transformations to be triggered by one another and applied only to affected dependences.

[1]  Frances E. Allen,et al.  Control-flow analysis , 2022 .

[2]  F. Allen Interprocedural Analysis and the Information derived by it , 1974, Programming Methodology.

[3]  Jack B. Dennis,et al.  First version of a data flow procedure language , 1974, Symposium on Programming.

[4]  Mark N. Wegman,et al.  A Fast and Usually Linear Algorithm for Global Flow Analysis , 1976, J. ACM.

[5]  R. A. Towle,et al.  Control and data dependence for program transformations. , 1976 .

[6]  Alfred V. Aho,et al.  Principles of Compiler Design , 1977 .

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

[8]  John H. Reif,et al.  Symbolic evaluation and the global value graph , 1977, POPL.

[9]  Richard C. Waters Automatic Analysis of the Logical Structure of Programs , 1978 .

[10]  K. J. Ottenstein,et al.  Data-flow graphs as an intermediate program form. , 1978 .

[11]  Wil Plouffe,et al.  An asynchronous programming language and computing machine , 1978 .

[12]  David L. Kuck,et al.  The Structure of Computers and Computations , 1978 .

[13]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[14]  Robert Henry Kuhn,et al.  Optimization and interconnection complexity for: parallel processors, single-stage networks, and decision trees , 1980 .

[15]  David Alejandro Padua Haiek Multiprocessors: discussion of some theoretical and practical problems , 1980 .

[16]  Jack B. Dennis,et al.  Data Flow Supercomputers , 1980, Computer.

[17]  David A. Padua,et al.  High-Speed Multiprocessors and Compilation Techniques , 1980, IEEE Transactions on Computers.

[18]  J. A. Jordan Computing Education for the Developing Asian Countries , 1980, Computer.

[19]  Mark N. Wegman,et al.  A program development tool , 1981, POPL '81.

[20]  David A. Padua,et al.  Dependence graphs and compiler optimizations , 1981, POPL '81.

[21]  Martin Mikelsons Prettyprinting in an interactive programming environment , 1981 .

[22]  Mark Weiser,et al.  Programmers use slices when debugging , 1982, CACM.

[23]  Robert M. Keller,et al.  Data Flow Program Graphs , 1982, Computer.

[24]  Ken Kennedy,et al.  PFC: A Program to Convert Fortran to Parallel Form , 1982 .

[25]  Richard C. Waters,et al.  The Programmer's Apprentice: Knowledge Based Program Editing , 1982, IEEE Transactions on Software Engineering.

[26]  Richard P. Hopkins,et al.  Combining Data Flow and Control Flow Computing , 1982, Comput. J..

[27]  Frank W. Allen A File Index for Document Storage and Retrieval Utilizing. Descriptor Fragments , 1982, Comput. J..

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

[29]  John Glauert,et al.  SISAL: streams and iteration in a single-assignment language. Language reference manual, Version 1. 1 , 1983 .

[30]  John Randal Allen,et al.  Dependence analysis for subscripted variables and its application to program transformations , 1983 .

[31]  Ron Tischler,et al.  Static analysis of programs as an aid to debugging , 1983, SIGSOFT '83.

[32]  Mark N. Wegman,et al.  Summarizing graphs by regular expressions , 1983, POPL '83.

[33]  Karl J. Ottenstein,et al.  A program form based on data dependency in predicate regions , 1983, POPL '83.

[34]  Barbara G. Ryder Incremental data flow analysis , 1983, POPL '83.

[35]  Ken Kennedy,et al.  Efficient computation of flow insensitive interprocedural summary information , 1984, SIGPLAN '84.

[36]  Mark N. Wegman,et al.  A Program Development Tool , 1984, IBM J. Res. Dev..

[37]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984 .

[38]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

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

[40]  Joe D. Warren,et al.  A hierarchical basis for reordering transformations , 1984, POPL '84.

[41]  Keith D. Cooper,et al.  Analyzing aliases of reference formal parameters , 1985, POPL.

[42]  Jeanne Ferrante,et al.  On linearizing parallel code , 1985, POPL.

[43]  Vivek Sarkar,et al.  Compile-time partitioning and scheduling of parallel programs , 1986, SIGPLAN '86.

[44]  Vivek Sarkar,et al.  Partitioning parallel programs for macro-dataflow , 1986, LFP '86.

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

[46]  Ron Cytron,et al.  Code motion of control structures in high-level languages , 1986, POPL '86.

[47]  Ken Kennedy,et al.  Automatic translation of FORTRAN programs to vector form , 1987, TOPL.