ABSTRACT
Interprocedural data flow analysis is complicated by the use of procedure and label variables in programs and by the presence of aliasing among variables. In this paper we present an algorithm for computing possible values for procedure and label variables, thus providing a call graph and a control flow graph. The algorithm also computes the possible aliasing relationships in the program being analyzed.We assume that control flow information is not available to the algorithm; hence, this type of analysis may be termed "flow-free analysis." Given this assumption, we demonstrate the correctness of the algorithm, in the sense that the information it produces is conservative, and show that it is as precise as possible in certain cases. We also show that the problem of determining possible values for procedure variables is P-space hard. This fact indicates that any algorithm which is precise in all cases must also run very slowly for some programs.
- Aho, A. V., Hopcroft, J. E., and Ullman, J. D. Design and Analysis of Computer Algorithms, Addison-Wesley, 1974, Google ScholarDigital Library
- Aho, A. V. and Ullman, J. D. Principles of Compiler Design, Addison-Wesley, 1977. Google ScholarDigital Library
- Allen, F. E. Interprocedural Data Flow Analysis. Proceedings IFIP Congress 74, North Holland Publishing Company, Amsterdam, 398-402.Google Scholar
- Allen, F. E. and Cocke, J. A Program Data Flow Analysis Procedure. CACM 19, 3 (March 1976), 137-147. Google ScholarDigital Library
- Allen, F. E., et. al. The Experimental Compiling Systems Project. IBM Research Report RC6718, T.J. Watson Research Center, Yorktown Heights, N.Y. September 1977.Google Scholar
- Banning, J. P. A Method for Determining the Side Effects of Procedure Calls. Ph.D. Thesis, Stanford University. Report No. 213, Stanford Linear Accelerator Center (August 1978). Google ScholarDigital Library
- Barth, J. Interprocedural Data Flow Analysis Based on Transitive Closure. Univ. of California at Berkeley, Computer Science Dept., Tech. Rep. UCB-CS-76-44, September 1976.Google Scholar
- Carter, J. L. Private Communication.Google Scholar
- Graham, S. L. and Wegman, M. A Fast and Usually Linear Algorithm for Global Flow Analysis. JACM 23, 1 (January 1976), 172-202. Google ScholarDigital Library
- Rosen, B. K. Data Flow Analysis for Procedural Languages. JACM 26, 2 (April 1979), 322-344. Google ScholarDigital Library
- Ryder, B. G. Constructing the Call Graph of a Program. IEEE Transactions on Software Engineering SE-5, 3 (May 1979), 216-226.Google ScholarDigital Library
- Spillman, T. C. Exposing Side-Effects in a PL/I Optimizing Compiler. Proceedings IFIP Conference 1971, North Holland Publishing Company, Amsterdam, 376-381.Google Scholar
- Walter, K. G. Recursion Analysis for Compiler Optimization. CACM 19, 9 (September 1976), 514-516. Google ScholarDigital Library
- Wegman, M. N., and Carter, J. L. New Classes and Applications of Hash Functions. Proceedings 20th Annual Symposium on Foundations of Computer Science (October 1979), 175-182.Google ScholarDigital Library
- Weihl, W. E. Interprocedural Data Flow Analysis in the Presence of Pointers, Procedure Variables, and Label Variables. S.M. Thesis, Massachusetts Institute of Technology (to be published).Google Scholar
- Winklmann, K. A. A Theoretical Study of Some Aspects of Parameter Passing in ALGOL60 and in Similar Programming Languages. Ph.D. Thesis, Purdue University (August 1977). Google ScholarDigital Library
Recommendations
Efficient flow-sensitive interprocedural data-flow analysis in the presence of pointers
CC'06: Proceedings of the 15th international conference on Compiler ConstructionThis paper presents a new worklist algorithm that significantly speeds up a large class of flow-sensitive data-flow analyses, including typestate error checking and pointer analysis. Our algorithm works particularly well for interprocedural analyses. By ...
Comments