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.
- L. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, May 1994. DIKU report 94/19.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- J. DaSilva. A probabilistic pointer analysis for speculative optimizations. Master's thesis, University of Toronto, February 2006.]]Google Scholar
- 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 ScholarDigital Library
- C. Dulong. The ia-64 architecture at work. Computer, 31(7):24--32, 1998.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Intel Corporation. IA-64 Application Developer's Architecture Guide. May 1999.]]Google Scholar
- V. Krishnan and J. Torrellas. A chip multiprocessor architecture with speculative multithreading. IEEE Transactions on Computers, Special Issue on Multithreaded Architecture, September 1999.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- A probabilistic pointer analysis for speculative optimizations
Recommendations
A probabilistic pointer analysis for speculative optimizations
Proceedings of the 2006 ASPLOS ConferencePointer 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 ...
A probabilistic pointer analysis for speculative optimizations
Proceedings of the 2006 ASPLOS ConferencePointer 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 ...
A probabilistic pointer analysis for speculative optimizations
Proceedings of the 2006 ASPLOS ConferencePointer 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 ...
Comments