Interprocedural dataflow analysis is useful in compiler optimization, automatic vectorization and parallelization, dataflow anomaly detection, and software maintenance applications such as program revalidation, and software tools that make a program more understandable by showing data dependencies. These applications require the solution of dataflow problems such as reaching definitions, live variables, available expressions, and definition-use chains. When solving these problems interprocedurally, the context of each call must be taken into account. In this paper, a method to solve this kind of dataflow problem is presented. This method consists of special dataflow equations that are solved for a program flowgraph. In deference to calling context, separate sets, called entry and body sets, are maintained at each node in the flowgraph. The entry set contains calling-context effects that enter a procedure. The body set contains effects that result from statements in the procedure. By isolating calling-context effects in the entry set, a call's nonkilled calling context is preserved by means of a simple intersection operation done at the return node for that call. The main advantages of this method are its precision and low complexity, and the fact that the presence of recursion does not affect the accuracy of the result.
[1]
Frances E. Allen,et al.
Interprocedural Data Flow Analysis
,
1974,
IFIP Congress.
[2]
Matthew S. Hecht,et al.
Flow Analysis of Computer Programs
,
1977
.
[3]
John Banning,et al.
: An Efficient
,
2022
.
[4]
Barry K. Rosen.
Data Flow Analysis for Procedural Languages
,
1979,
JACM.
[5]
Alfred V. Aho,et al.
Compilers: Principles, Techniques, and Tools
,
1986,
Addison-Wesley series in computer science / World student series edition.
[6]
Joe D. Warren,et al.
The program dependence graph and its use in optimization
,
1987,
TOPL.
[7]
David Callahan,et al.
The program summary graph and flow-sensitive interprocedual data flow analysis
,
1988,
PLDI '88.
[8]
Philip J. Hatcher,et al.
Compiling C* programs for a hypercube multicomputer
,
1988,
PPoPP 1988.
[9]
STEPHEN RICHARDSON,et al.
Interprocedural optimization: Experimental results
,
1989,
Softw. Pract. Exp..
[10]
David W. Binkley,et al.
Interprocedural slicing using dependence graphs
,
1990,
TOPL.
[11]
Barbara G. Ryder,et al.
Pointer-induced aliasing: a problem classification
,
1991,
POPL '91.
[12]
Barbara G. Ryder,et al.
A safe approximate algorithm for interprocedural aliasing
,
1992,
PLDI '92.