Symbolic evaluation and the global value graph

This paper is concerned with difficult global flow problems which require the symbolic evaluation of programs. We use, as is common in global flow analysis, a model in which the expressions computed are specified, but the flow of control is indicated only by a directed graph whose nodes are blocks of assignment statements. We show that if such a program model is interpreted in the domain of integer arithmetic then many natural global flow problems are unsolvable. We then develop a direct (non-iterative) method for finding general symbolic values for program expressions. Our method gives results similar to an iterative method due to Kildall and a direct method due to Fong, Kam, and Ullman. By means of a structure called the global value graph which compactly represents both symbolic values and the flow of these values through the program, we are able to obtain results that are as strong as either of these algorithms at a lower time cost, while retaining applicability to all flow graphs.

[1]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

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

[3]  John Cocke Global common subexpression elimination , 1970 .

[4]  Ken Kennedy Safety of code motion , 1972 .

[5]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

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

[7]  Jeffrey D. Ullman,et al.  Analysis of a simple algorithm for global data flow problems , 1973, POPL.

[8]  Ben Wegbreit,et al.  The synthesis of loop predicates , 1974, CACM.

[9]  Jeffrey D. Ullman,et al.  Application of lattice algebra to loop optimization , 1975, POPL '75.

[10]  Robert E. Tarjan,et al.  Efficiency of a Good But Not Linear Set Union Algorithm , 1972, JACM.

[11]  R. Tarjan Solving path problems on directed graphs. , 1975 .

[12]  David B. Loveman,et al.  Program optimization - theory and practice , 1975, Programming Languages and Compilers for Parallel and Vector Machines.

[13]  Ken Kennedy,et al.  Node listings applied to data flow analysis , 1975, POPL '75.

[14]  Donald E. Knuth,et al.  Big Omicron and big Omega and big Theta , 1976, SIGA.

[15]  Jeffrey D. Ullman,et al.  Global Data Flow Analysis and Iterative Algorithms , 1976, J. ACM.

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

[17]  Jeffrey D. Ullman,et al.  Induction variables in very high level languages , 1976, POPL.

[18]  Jacob T. Schwartz,et al.  Optimization of Very High Level Languages - I. Value Transmission and Its Corollaries , 1975, Comput. Lang..

[19]  Robert E. Tarjan,et al.  Applications of Path Compression on Balanced Trees , 1979, JACM.