skip to main content
10.1145/349299.349310acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free Access

Off-line variable substitution for scaling points-to analysis

Published:01 May 2000Publication History

ABSTRACT

Most compiler optimizations and software productivity tools rely on information about the effects of pointer dereferences in a program. The purpose of points-to analysis is to compute this information safely, and as accurately as is practical. Unfortunately, accurate points-to information is difficult to obtain for large programs, because the time and space requirements of the analysis become prohibitive.

We consider the problem of scaling flow- and context-insensitive points-to analysis to large programs, perhaps containing hundreds of thousands of lines of code. Our approach is based on a variable substitution transformation, which is performed off-line, i.e., before a standard points-to analysis is performed. The general idea of variable substitution is that a set of variables in a program can be replaced by a single representative variable, thereby reducing the input size of the problem. Our main contribution is a linear-time algorithm which finds a particular variable substitution that maintains the precision of the standard analysis, and is also very effective in reducing the size of the problem.

We report our experience in performing points-to analysis on large C programs, including some industrial-sized ones. Experiments show that our algorithm can reduce the cost of Andersen's points-to analysis substantially: on average, it reduced the running time by 53% and the memory cost by 59%, relative to an efficient baseline implementation of the analysis.

References

  1. 1.A. Aiken, M. FShndrich, J. Foster, and Z. Su. A toolkit for constructing type- and constraint-based program analyses. In Prec. Workshop on Types in Compilation, LNCS 1473, pages 78-96, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.L. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.Google ScholarGoogle Scholar
  3. 3.G. DeFouw, D. Grove, and C. Chambers. Fast interprocedural class analysis. In Prec. Symposium on Principles of Programming Languages, pages 222-236, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.M. Emami, R. Ghiya, and L. Hendren. Contextsensitive interprocedural points-to analysis in the presence of function pointers. In Prec. Conference on Programming Language Design and Implementation, pages 242-257, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.M. FShndrich, J. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In Prec. Conference on Programming Language Design and Implementation, pages 85-96, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.R. Ghiya and L. Hendren. Is it a tree, a DAG or a cyclic graph? In Prec. Symposium on Principles of Programming Languages, pages 1-15, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.M. Hind, M. Burke, P. Carini, and J. D. Choi. Interprocedural pointer alias analysis. A CM Transactions on Programming Languages and Systems, 21(4):848-894, July 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.W. Landi and B. G. Ryder. A safe approximation algorithm for interprocedural pointer aliasing. In Prec. Conference on Programming Language Design and Implementation, pages 235-248' 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.D. Liang and M. J. Harrold. Efficient points-to analysis for whole-program analysis. In Proc. Symposium on the Foundations of Software Engineering' LNCS 1687, pages 199-215, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.D. Liang and M. J. Harrold. Equivalence analysis: A general technique to improve the efficiency of data-flow analyses in the presence of pointers. In Proc. Workshop on Program Analysis for Software Tools and Engineering, pages 39-46, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.J. Reppy. A high-performance garbage collector for Standard ML. Technical memorandum, AT-T Bell Laboratories, Dec. 1993.Google ScholarGoogle Scholar
  12. 12.A. Rountev, B. G. Ryder, and W. Landi. Data-flow analysis of program fragments. In Proc. Symposium on the Foundations of Software Engineering, LNCS 1687, pages 235-252, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.M. Sagiv, T. Reps, and R. Wilhelm. Solving shapeanalysis problems in languages with destructive updating. A CM Transactions on Programming Languages and Systems, 20(1):1-50, Jan. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.M. Shapiro and S. Horwitz. Fast and accurate flowinsensitive points-to analysis. In Proc. Symposium on Principles of Programming Languages, pages 1-14, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.B. Steensgaard. Points-to analysis in almost linear time. In Proc. Symposium on Principles of Programming Languages, pages 32-41, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.Z. Su, M. FShndrich, and A. Aiken. Projection merging: Reducing redundancies in inclusion constraint graphs. In Proc. Symposium on Principles of Programming Languages, pages 81-95, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.R. E. Tarjan. Data Structures and Network Algorithms. Society for Industrial and Applied Mathematics, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.R. Wilson and M. Lain. Efficient context-sensitive pointer analysis for C programs. In Proc. Conference on Programming Language Design and Implementation, pages 1-12, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.S. Zhang, B. G. Ryder, and W. Landi. Program decomposition for pointer aliasing: A step towards practical analyses. In Proc. Symposium on the Foundations of Software Engineering, pages 81-92, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Off-line variable substitution for scaling points-to analysis

      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
      • Published in

        cover image ACM Conferences
        PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation
        August 2000
        358 pages
        ISBN:1581131992
        DOI:10.1145/349299

        Copyright © 2000 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 May 2000

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        PLDI '00 Paper Acceptance Rate30of173submissions,17%Overall Acceptance Rate406of2,067submissions,20%

        Upcoming Conference

        PLDI '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader