skip to main content
article
Free Access

A practical interprocedural data flow analysis algorithm

Published:01 September 1978Publication History
Skip Abstract Section

Abstract

A new interprocedural data flow analysis algorithm is presented and analyzed. The algorithm associates with each procedure in a program information about which variables may be modified, which may be used, and which are possibly preserved by a call on the procedure, and all of its subcalls. The algorithm is sufficiently powerful to be used on recursive programs and to deal with the sharing of variables which arises through reference parameters. The algorithm is unique in that it can compute all of this information in a single pass, not requiring a prepass to compute calling relationships or sharing patterns. The algorithm is asymptotically optimal in time complexity. It has been implemented and is practical even on programs which are quite large.

References

  1. 1 Allen, F.E. Interprocedural data flow analysis. Information Processing 74, North-Holland Pub. Co., Amsterdam, 1974, pp. 398--402.Google ScholarGoogle Scholar
  2. 2 Allen, F.E., and Schwartz, J.T. Determining the data relationships in a collection of procedures (unpublished detailed summary).Google ScholarGoogle Scholar
  3. 3 Ammann, U. Compiler for PASCAL 6000--3.4. ETH, Institut fiir Informatik, Zurich, Switzerland, 1974.Google ScholarGoogle Scholar
  4. 4 Barth, J.M. An interprocedural data flow analysis algorithm. Conf. Rec. Fourth ACM Symp, Principles of Programming Languages, Los Angeles, Calif., Jan. 1977, pp. 119-13 I. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5 Barth, J.M. A practical interprocedural data flow analysis algorithm and its applications. Ph.D. Diss., Comptr. Sci. Tech. Rep. No. 770520, U. of California, Berkeley, May 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 Graham, S.L., and Wegrnan, M. A fast and usually linear algorithm for global flow analysis. J. ACM 23, I (Jan. 1976), 172-202. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 Hecht, M.S., and Shaffer, J.B. Ideas on the design of a "quad improver" for SIMPL-T, Pt. I: Overview and intersegment analysis. Comptr. Sci. Tech, Rcp. TR-405, U. of Maryland, CoUege Park, Md., Aug. 1975. This report is superceded by {8}, but contains some information not in the latter paper.Google ScholarGoogle Scholar
  8. 8 Hecht, M.S., and Shaffer, J.B. A modest quad improver for SIMPL-T, Dept. Comptr. Sci., U. of Maryland, CoUegc Park, Md., April 1977.Google ScholarGoogle Scholar
  9. 9 Hecht, M.S., and UUman, J.D. A simple algorithm for global flow problems. SIAM J. Comptng. 4, 4 (Dec. 1975), 519-532.Google ScholarGoogle ScholarCross RefCross Ref
  10. 10 Jensen, K., Wirth, N. PASCAL User Manual and Report. Leciure Notes in Computer Science No. 18, Springer-Verlag, Berlin, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11 Lomet, D.B. Data flow analysis in the presence of procedure calls. Res. Rep. RC5728 IBM T.J. Watson Res. Ctr., Yorktown Heights, N.Y., Nov. 1975.Google ScholarGoogle Scholar
  12. 12 Nanr, P. Ed. Revised report on the algorithmic language Algol- 60. Comm. ACM 6, 1 (Jan. 1963), 1-17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13 Rosen, B.K. Data flow analysis for recursive PL/I programs. Res, Rep. RC5211, IBM T.J. Watson Res. Ctr., Yorktown Heights, N.Y., Jan. 1975. This report is superceded by {16}.Google ScholarGoogle Scholar
  14. 14 Rosen, B.K. High level data flow analysis, Pt. 1 (classical structured programming). Res. Rep. RC5598, IBM, T.J. Watson Res. Ctr., Yorktown Heights, N.Y., Aug. 1975.Google ScholarGoogle Scholar
  15. 15 Rosen, B.K. High level data flow analysis, Pt. 2 (escapes and jumps). Res. Rep. RC5744, IBM T.J. Watson Res. Ctr., Yorktown Heights, N.Y. Dec. 1975.Google ScholarGoogle Scholar
  16. 16 Rosen, B.K. Data flow analysis for procedural languages. T.J. Watson Res. Ctr., Yorktown Heights, N.Y., 1976.Google ScholarGoogle Scholar
  17. 17 Spillman, T.C. Exposing side effects in a PL/I optimizing compiler. Proceedings IFIP Conference 1971, North Holland Publishing Company, Amsterdam (1971), 376-381.Google ScholarGoogle Scholar
  18. 18 Tarjan, R.E. Solving path problems on directed graphs. Tech. Rep. STAN-CS-75-528, Comptr. Sci. Dept., Stanford U., Stanford, Calif., Nov. 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A practical interprocedural data flow analysis algorithm

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image Communications of the ACM
          Communications of the ACM  Volume 21, Issue 9
          Sept. 1978
          82 pages
          ISSN:0001-0782
          EISSN:1557-7317
          DOI:10.1145/359588
          Issue’s Table of Contents

          Copyright © 1978 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 September 1978

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader