A Control-Flow Normalization Algorithm and Its Complexity

A single method for normalizing the control-flow of programs to facilitate program transformations, program analysis, and automatic parallelization is presented. While previous methods result in programs whose control flowgraphs are reducible, programs normalized by this technique satisfy a stronger condition than reducibility and are therefore simpler in their syntax and structure than with previous methods. In particular, all control-flow cycles are normalized into single-entry, single-exit while loops and all GOTOs are eliminated. Furthermore, the method avoids problems of code replication that are characteristic of node-splitting techniques. This restructuring obviates the control dependence graph, since afterwards control dependence relations are manifest in the syntax tree of the program. Transformations that effect this normalization are presented, and the complexity of the method is studied. >

[1]  S C Kleene,et al.  Representation of Events in Nerve Nets and Finite Automata , 1951 .

[2]  Stephen J. Garland,et al.  Algorithm 97: Shortest path , 1962, Commun. ACM.

[3]  Corrado Böhm,et al.  Flow diagrams, turing machines and languages with only two formation rules , 1966, CACM.

[4]  Frances E. Allen,et al.  A Basis for Program Optimization , 1971, IFIP Congress.

[5]  Robert W. Floyd,et al.  Notes on Avoiding "go to" Statements , 1971, Information Processing Letters.

[6]  Antoni W. Mazurkiewicz,et al.  Proving Algorithms by Tail Functions , 1971, Inf. Control..

[7]  B. Carré An Algebra for Network Routing Problems , 1971 .

[8]  Zohar Manna,et al.  The Translation of 'Go To' Programs to 'While' Programs , 1971, IFIP Congress.

[9]  Tadao Kasami,et al.  On the capabilities of while, repeat, and exit statements , 1973, Commun. ACM.

[10]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[11]  Donald E. Knuth,et al.  Structured Programming with go to Statements , 1974, CSUR.

[12]  Zohar Manna,et al.  Translating Program Schemas to While-Schemas , 1975, SIAM J. Comput..

[13]  Robert D. Tennent,et al.  The denotational semantics of programming languages , 1976, CACM.

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

[15]  John Cocke,et al.  A program data flow analysis procedure , 1976, CACM.

[16]  Brenda S. Baker,et al.  An Algorithm for Structuring Flowgraphs , 1977, J. ACM.

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

[18]  E. Reingold,et al.  Combinatorial Algorithms: Theory and Practice , 1977 .

[19]  Donald B. Johnson,et al.  Efficient Algorithms for Shortest Paths in Sparse Networks , 1977, J. ACM.

[20]  Joe Stoy,et al.  Denotational Semantics , 1977 .

[21]  M. Howard Williams,et al.  Conversion of Unstructured Flow Diagrams to Structured Form , 1978, Comput. J..

[22]  R. Scheifler A DENOTATIONAL SEMANTICS OF CLU , 1978 .

[23]  Robert E. Tarjan,et al.  Fast Algorithms for Solving Path Problems , 1981, JACM.

[24]  Rodney A. Brooks,et al.  An optimizing compiler for lexically scoped LISP , 1982, SIGPLAN '82.

[25]  Barbara Gershon Ryder Incremental data flow analysis based on a unified model of elimination algorithms , 1982 .

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

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

[28]  David A. Padua,et al.  Advanced compiler optimizations for supercomputers , 1986, CACM.

[29]  Barbara G. Ryder,et al.  Elimination algorithms for data flow analysis , 1986, CSUR.

[30]  Michael Wolfe,et al.  The KAP/205 : An Advanced Source-to-Source Vectorizer for the Cyber 205 Supercomputer , 1986, ICPP.

[31]  Ron Cytron,et al.  An Overview of the PTRAN Analysis System for Multiprocessing , 1988, J. Parallel Distributed Comput..

[32]  Zahira Ammarguellat Restructuration des programmes fortran en vue de leur parallelisation , 1988 .

[33]  Williams Ludwell Harrison,et al.  The interprocedural analysis and automatic parallelization of Scheme programs , 1990, LISP Symb. Comput..

[34]  Williams Ludwell Harrison,et al.  The Design of Automatic Parallelizers for Symbolic and Numeric Programs , 1989, Workshop on Parallel Lisp.

[35]  Peter D. Mosses,et al.  Denotational semantics , 1995, LICS 1995.

[36]  Williams Ludwell Harrison,et al.  Automatic recognition of induction variables and recurrence relations by abstract interpretation , 1990, PLDI '90.