skip to main content
10.1145/1168857.1168908acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
Article

A probabilistic pointer analysis for speculative optimizations

Published:20 October 2006Publication History

ABSTRACT

Pointer analysis is a critical compiler analysis used to disambiguate the indirect memory references that result from the use of pointers and pointer-based data structures. A conventional pointer analysis deduces for every pair of pointers, at any program point, whether a points-to relation between them (i) definitely exists, (ii) definitely does not exist, or (iii) maybe exists. Many compiler optimizations rely on accurate pointer analysis, and to ensure correctness cannot optimize in the maybe case. In contrast, recently-proposed speculative optimizations can aggressively exploit the maybe case, especially if the likelihood that two pointers alias can be quantified. This paper proposes a Probabilistic Pointer Analysis (PPA) algorithm that statically predicts the probability of each points-to relation at every program point. Building on simple control-flow edge profiling, our analysis is both one-level context and flow sensitive-yet can still scale to large programs including the SPEC 2000 integer benchmark suite. The key to our approach is to compute points-to probabilities through the use of linear transfer functions that are efficiently encoded as sparse matrices.We demonstrate that our analysis can provide accurate probabilities, even without edge-profile information. We also find that-even without considering probability information-our analysis provides an accurate approach to performing pointer analysis.

References

  1. L. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, May 1994. DIKU report 94/19.]]Google ScholarGoogle Scholar
  2. M. Berndl, O. Lhotak, F. Qian, L. Hendren, and N. Umanee. Points-to analysis using bdds. In PLDI '03: Proceedings of the 2003 conference on Programming language design and implementation, pages 103--114, New York, NY, USA, 2003. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Bhowmik and M. Franklin. A fast approximate interprocedural analysis for speculative multithreading compilers. In ICS '03: Proceedings of the 17th annual international conference on Supercomputing, pages 32--41, New York, NY, USA, 2003. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P.-S. Chen, M.-Y. Hung, Y.-S. Hwang, R. D.-C. Ju, and J.K. Lee. Compiler support for speculative multithreading architecture with probabilistic points-to analysis. SIGPLAN Not., 38(10):25--36, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P.-S. Chen, Y.-S. Hwang, R. D.-C. Ju, and J.K. Lee. Interprocedural probabilistic pointer analysis. IEEE Trans. Parallel Distrib. Syst., 15(10):893--907, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R.D. ching Ju, J.-F. Collard, and K. Oukbir. Probabilistic memory disambiguation and its application to data speculation. SIGARCH Comput. Archit. News, 27(1):27--30, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. X. Dai, A. Zhai, W.-C. Hsu, and P.-C. Yew. A general compiler framework for speculative optimizations using data speculative code motion. In CGO, pages 280--290, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Das, B. Liblit, M. Fahndrich, and J. Rehof. Estimating the impact of scalable pointer analysis on optimization. In SAS '01: Proceedings of the 8th International Symposium on Static Analysis, pages 260--278, London, UK, 2001. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. DaSilva. A probabilistic pointer analysis for speculative optimizations. Master's thesis, University of Toronto, February 2006.]]Google ScholarGoogle Scholar
  10. A. Diwan, K.S. McKinley, and J.E.B. Moss. Using types to analyze and optimize object-oriented programs. ACM Transactions on Programming Languages and Systems, 23(1):30--72, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Dulong. The ia-64 architecture at work. Computer, 31(7):24--32, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Emami, R. Ghiya, and L.J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In PLDI '94: Proceedings of the 1994 conference on Programming language design and implementation, pages 242--256, New York, NY, USA, 1994. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Fernandez and R. Espasa. Speculative alias analysis for executable code. In PACT '02: Proceedings of the 2002 International Conference on Parallel Architectures and Compilation Techniques, pages 222--231, Washington, DC, USA, 2002. IEEE Computer Society.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. L. Hammond, B.D. Carlstrom, V. Wong, B. Hertzberg, M. Chen, C. Kozyrakis, and K. Olukotun. Programming with transactional coherence and consistency (tcc). In Proceedings of the 11th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 1--13. ACM Press, Oct 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Hammond, M. Willey, and K. Olukotun. Data speculation support for a chip multiprocessor. In Proceedings of the Eighth ACM Conference on Architectural Support for Programming Languages and Operating Systems, October 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Hind. Pointer analysis: haven't we solved this problem yet? In PASTE '01: Proceedings of the 2001 workshop on Program analysis for software tools and engineering, pages 54--61, New York, NY, USA, 2001. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Hind and A. Pioli. Which pointer analysis should i use? In ISSTA '00: Proceedings of the 2000 ACM SIGSOFT international symposium on Software testing and analysis, pages 113--123, New York, NY, USA, 2000. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Intel Corporation. IA-64 Application Developer's Architecture Guide. May 1999.]]Google ScholarGoogle Scholar
  19. V. Krishnan and J. Torrellas. A chip multiprocessor architecture with speculative multithreading. IEEE Transactions on Computers, Special Issue on Multithreaded Architecture, September 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. W. Landi and B.G. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI), volume 27, pages 235--248, New York, NY, 1992. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Lin, T. Chen, W.-C. Hsu, and P.-C. Yew. Speculative register promotion using advanced load address table (alat). In CGO '03: Proceedings of the international symposium on Code generation and optimization, pages 125--134, Washington, DC, USA, 2003. IEEE Computer Society.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Lin, T. Chen, W.-C. Hsu, P.-C. Yew, R. D.-C. Ju, T.-F. Ngai, and S. Chan. A compiler framework for speculative analysis and optimizations. In PLDI '03: Proceedings of the 2003 conference on Programming language design and implementation, pages 289--299, New York, NY, USA, 2003. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. G. Ramalingam. Data flow frequency analysis. In PLDI '96: Proceedings of the 1996 conference on Programming language design and implementation, pages 267-277, New York, NY, USA, 1996. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Roth and G.S. Sohi. Speculative data-driven multithreading. In Proceedings of the 7th International Symposium on High Performance Computer Architecture, January 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Rugina and M. Rinard. Pointer analysis for multithreaded programs. In PLDI '99: Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation, pages 77--90, New York, NY, USA, 1999. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. B. Steensgaard. Points-to analysis in almost linear time. In POPL '96: Proceedings of the 23rd symposium on Principles of programming languages, pages 32--41, New York, NY, USA, 1996. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J.G. Steffan, C.B. Colohan, A. Zhai, and T.C. Mowry. The stampede approach to thread-level speculation. ACMTransactions on Computer Systems, 23(3):253--300, August 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. Tarjan. Testing flow graph reducibility. In STOC '73: Proceedings of the fifth annual ACM symposium on Theory of computing, pages 96--107, New York, NY, USA, 1973. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Tjiang, M. Wolf, M. Lam, K. Pieper, and J. Hennessy. Languages and Compilers for Parallel Computing, pages 137--151. Springer-Verlag, Berlin, Germany, 1992.]]Google ScholarGoogle Scholar
  30. J. Whaley and M.S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In PLDI '04: Proceedings of the 2004 conference on Programming language design and implementation, pages 131--144, New York, NY,USA, 2004. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R.P. Wilson and M.S. Lam. Efficient context-sensitive pointer analysis for c programs. In PLDI '95: Proceedings of the 1995 conference on Programming language design and implementation, pages 1--12, New York, NY, USA, 1995. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Zhu and S. Calman. Symbolic pointer analysis revisited. In PLDI '04: Proceedings of the 2004 conference on Programming language design and implementation, pages 145--157, New York, NY, USA, 2004. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A probabilistic pointer analysis for speculative optimizations

    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
      ASPLOS XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems
      October 2006
      440 pages
      ISBN:1595934510
      DOI:10.1145/1168857
      • cover image ACM SIGOPS Operating Systems Review
        ACM SIGOPS Operating Systems Review  Volume 40, Issue 5
        Proceedings of the 2006 ASPLOS Conference
        December 2006
        425 pages
        ISSN:0163-5980
        DOI:10.1145/1168917
        Issue’s Table of Contents
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 41, Issue 11
        Proceedings of the 2006 ASPLOS Conference
        November 2006
        425 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1168918
        Issue’s Table of Contents
      • cover image ACM SIGARCH Computer Architecture News
        ACM SIGARCH Computer Architecture News  Volume 34, Issue 5
        Proceedings of the 2006 ASPLOS Conference
        December 2006
        425 pages
        ISSN:0163-5964
        DOI:10.1145/1168919
        Issue’s Table of Contents

      Copyright © 2006 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: 20 October 2006

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      ASPLOS XII Paper Acceptance Rate38of158submissions,24%Overall Acceptance Rate535of2,713submissions,20%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader