skip to main content
research-article

Exploiting the structure of the constraint graph for efficient points-to analysis

Authors Info & Claims
Published:15 June 2012Publication History
Skip Abstract Section

Abstract

Points-to analysis is a key compiler analysis. Several memory related optimizations use points-to information to improve their effectiveness. Points-to analysis is performed by building a constraint graph of pointer variables and dynamically updating it to propagate more and more points-to information across its subset edges. So far, the structure of the constraint graph has been only trivially exploited for efficient propagation of information, e.g., in identifying cyclic components or to propagate information in topological order. We perform a careful study of its structure and propose a new inclusion-based flow-insensitive context-sensitive points-to analysis algorithm based on the notion of dominant pointers. We also propose a new kind of pointer-equivalence based on dominant pointers which provides significantly more opportunities for reducing the number of pointers tracked during the analysis. Based on this hitherto unexplored form of pointer-equivalence, we develop a new context-sensitive flow insensitive points-to analysis algorithm which uses incremental dominator update to efficiently compute points-to information. Using a large suite of programs consisting of SPEC 2000 benchmarks and five large open source programs we show that our points-to analysis is 88% faster than BDD-based Lazy Cycle Detection and 2× faster than Deep Propagation. We argue that our approach of detecting dominator-based pointer-equivalence is a key to improve points-to analysis efficiency.

References

  1. H. Agrawal and J. R. Horgan. Dynamic program slicing. In PLDI, pages 246--256, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. O. Andersen. Program analysis and specialization for the C programming language, PhD Thesis, DIKU, University of Copenhagen, 1994.Google ScholarGoogle Scholar
  3. M. Berndl, O. Lhoták, F. Qian, L. Hendren, and N. Umanee. Points-to analysis using bdds. In PLDI, PLDI '03, pages 103--114, New York, NY, USA, 2003. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Burke and L. Torczon. Interprocedural optimization eliminating unnecessary recompilation. ACM Trans. Program. Lang. Syst., 15: 367--399, July 1993. ISSN 0164-0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Cytron, J. Ferrante, B. K. Rosen,M. N.Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst., 13:451--490, October 1991. ISSN 0164-0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Das. Unification-based pointer analysis with directional assignments. In PLDI, PLDI '00, pages 35--46, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In PLDI, PLDI '94, pages 242--256, New York, NY, USA, 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Fähndrich, J. S. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In PLDI, PLDI '98, pages 85--96, New York, NY, USA, 1998. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Fähndrich, J. Rehof, and M. Das. Scalable context sensitive flow analysis using instantiation constraints. In PLDI, PLDI '00, pages 253--263, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Hardekopf. Homepage, http://www.cs.utexas.edu/users/benh/.Google ScholarGoogle Scholar
  11. B. Hardekopf and C. Lin. Exploiting pointer and location equivalence to optimize pointer analysis. In H. R. Nielson and G. Filé, editors, SAS, volume 4634 of Lecture Notes in Computer Science, pages 265--280. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. B. Hardekopf and C. Lin. The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In PLDI, PLDI '07, pages 290--299, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. Heintze and O. Tardieu. Ultra-fast aliasing analysis using cla: a million lines of c code in a second. In PLDI, PLDI '01, pages 254--263, New York, NY, USA, 2001. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Hind and A. Pioli. Which pointer analysis should i use? In ISSTA, ISSTA '00, pages 113--123, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. V. Kahlon. Bootstrapping: a technique for scalable flow and context sensitive pointer alias analysis. In PLDI, PLDI '08, pages 249--259, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Kanamori and D. Weise. Worklist management strategies for dataflow analysis, MSR Technical Report, MSR-TR-94-12, 1994.Google ScholarGoogle Scholar
  17. C. Lattner, A. Lenharth, and V. Adve. Making context-sensitive pointsto analysis with heap cloning practical for the real world. In PLDI, PLDI '07, pages 278--289, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Lengauer and R. E. Tarjan. A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst., 1(1):121--141, Jan. 1979. ISSN 0164-0925. doi: 10.1145/357062.357071. URL http://doi.acm.org/10.1145/357062.357071. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. O. Lhoták and L. Hendren. Scaling java points-to analysis using spark. In Proceedings of the 12th international conference on Compiler construction, CC'03, pages 153--169, Berlin, Heidelberg, 2003. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Nasre. Scaling context-sensitive points-to analysis, Ph.D. Thesis, CSA, Indian Institute of Science, 2012.Google ScholarGoogle Scholar
  21. R. Nasre and R. Govindarajan. Points-to analysis as a system of linear equations. In Proceedings of the 17th international conference on Static analysis, SAS'10, pages 422--438, Berlin, Heidelberg, 2010. Springer-Verlag. ISBN 3-642-15768-8, 978-3-642-15768-4. URL http://portal.acm.org/citation.cfm?id=1882094.1882120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. Nasre and R. Govindarajan. Prioritizing constraint evaluation for efficient points-to analysis. In CGO, CGO '11, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Nasre, K. Rajan, R. Govindarajan, and U. P. Khedker. Scalable context-sensitive points-to analysis using multi-dimensional bloomfilters. In Proceedings of the 7th Asian Symposium on Programming Languages and Systems, APLAS '09, pages 47--62, Berlin, Heidelberg, 2009. Springer-Verlag. ISBN 978-3-642-10671-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. J. Pearce, P. H. J. Kelly, and C. Hankin. Online cycle detection and difference propagation: Applications to pointer analysis. Software Quality Control, 12:311--337, December 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. F. M. Q. Pereira and D. Berlin. Wave propagation and deep propagation for pointer analysis. In CGO, CGO '09, pages 126--135, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. pereiraweb. Wave propagation / deep propagation website, http://compilers.cs.ucla.edu/fernando/projects/pta/home/.Google ScholarGoogle Scholar
  27. G. Ramalingam. The undecidability of aliasing. ACM Trans. Program. Lang. Syst., 16:1467--1471, September 1994. ISSN 0164-0925. doi: http://doi.acm.org/10.1145/186025.186041. URL http://doi.acm.org/10.1145/186025.186041. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. G. Ramalingam and T. Reps. An incremental algorithm for maintaining the dominator tree of a reducible flowgraph. In PLDI, POPL '94, pages 287--296, New York, NY, USA, 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Rountev and S. Chandra. Off-line variable substitution for scaling points-to analysis. In PLDI, PLDI '00, pages 47--56, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. O. G. Shivers. Control-flow analysis of higher-order languages PhD Thesis, Carnegie Mellon University, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. B. Steensgaard. Points-to analysis in almost linear time. I POPL, POPL '96, pages 32--41, New York, NY, USA, 1996. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Whaley and M. S. Lam. An efficient inclusion-based pointsto analysis for strictly-typed languages. In Proceedings of the 9th International Symposiumon Static Analysis, SAS '02, pages 180--195, London, UK, 2002. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACMSIGPLAN 2004 conference on Programming language design and implementation, PLDI '04, pages 131--144, New York, NY, USA, 2004. ACM. ISBN 1-58113-807-5. doi: http://doi.acm.org/10.1145/996841.996859. URL http://doi.acm.org/10.1145/996841.996859. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Exploiting the structure of the constraint graph for efficient 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

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 47, Issue 11
      ISMM '12
      November 2012
      136 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2426642
      Issue’s Table of Contents
      • cover image ACM Conferences
        ISMM '12: Proceedings of the 2012 international symposium on Memory Management
        June 2012
        152 pages
        ISBN:9781450313506
        DOI:10.1145/2258996

      Copyright © 2012 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: 15 June 2012

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader