Understanding Uncertainty in Static Pointer Analysis
2009
Abstract
For programs that make extensive use of pointers, pointer analysis is often critical for the effectiveness of optimising compilers and tools for reasoning about program behaviour and correctness. Static pointer analysis has been extensively studied and several algorithms have been proposed, but these only provide approximate solutions. As such inaccuracy may hinder further optimisations, it is important to understand how short these algorithms come of providing accurate information about the points-to relations. This thesis attempts to quantify the amount of uncertainty of the points-to relations that remains after a state-of-the-art contextand flow-sensitive pointer analysis algorithm is applied to a collection of programs from two well-known benchmark suites: SPEC integer and MediaBench. This remaining static uncertainty is then compared to the run-time behaviour. Unlike previous work that compared run-time behaviour against less accurate contextand flow-insensitive algorithms, th...
References (50)
- J. E. Sammet. Programming languages: History and future. Communications of ACM, Vol. 15, No. 7, pages 290-305, July 1972.
- A.V. Aho, R. Sethi, and J. D. Ullman. Compilers, Principles, Techniques and Tools. Addison-Wesley, 1995.
- R. Allen and K. Kennedy. Optimizing Compilers for Modern Architectures. Mor- gan Kaufmann, 2001.
- B. W. Kernighan and D. M. Ritcher. The C Programming Language, volume 1. Prentice Hall, second edition, 1988.
- M. Hind. Pointer analysis: Haven't we solved this problem yet? Wksp. On Program Analysis for Software Tools and Engineering, pages 54-61, June 2001.
- S. Muchnick. Advanced Compiler Design Implementation. Morgan Kaufmann, 1997.
- Dulong et al. An overview of the intel ia-64 compiler. Intel Technology Journal, November 1999.
- V. Krishnan and J. Torrellas. A chip-multiprocessor architecture with specula- tive multithreading. IEEE Transactions on Computers, Vol. 48, No 9, September 1999.
- L. Hammond, M. Willey, and K. Olukotun. Data speculation for a chip mul- tiprocessor. In Proc. of International Conference on Architectural Support for Programming Languages and Operating Systems, pages 58-69, October 1998.
- P. Chen, M. Hung, Y. Hwang, R. D. Ju, and J. K Lee. Compiler support for speculative multithreading architecture with probabilistic points-to analysis. In Proc. of Symposium on Principles and Practice of Parallel Programming, pages 24-36, June, 2003.
- R. D. Ju, J. Collard, and K. Oukbir. Probabilistic memory disambiguation and its application to data speculation. Computer Architecture News, Vol. 27, No 1, March 1999.
- Y. Hwang, P. Chen, J. K. Lee, and R. D. Ju. Probabilistic points-to analysis. Lecture Notes in Computer Science, Vol. 2624, Languages and Compilers for Parallel Computing (LCPC 2001 Issue), pages 290-305, 2003.
- J. D. Silva and J. G. Steffan. A probabilistic pointer analysis for speculative optimizations. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, October 2006.
- R. Rugina and M. Rinard. Pointer analysis for multithreaded programs, in pro- ceedings of acm sigplan. In Proceedings of Conference on Programming lan- guage design and implementation, pages 77-90, June 1999.
- R. A. Chowdhury, P. Djeu, B. Cachoon, J. H. Burrill, and K. S. McKinley. The limits of alias analysis for scalar optimizations. Technical Report TR-03-59 1, University of Texas at Austin, 2003.
- S. Debray, R. Muth, and M. Weippert. Alias analysis of executable code. In Proceedings of the Symposium on Principles of Programming Languages, pages 19-21, January 1998.
- R. Kennedy, S. Chan, S. Liu, R. Lo, P. Tu, and F. Chow. Partial redundancy elimination in ssa form. ACM Trans. Program. Languages and Systems, Vol. 21, No 3, pages 627-676, May 1999.
- F. Chow, S. Chan, R. Lo S.-M. Liu, and M. Streich. Effective representation of alias and indirect memory operations in ssa form. Proc. of International Confer- ence on Compiler Construction, pages 253-257, April 1996.
- R. Lo, F. Chow, R. Kennedy, S. Liu, and P. Tu. Register promotion by sparse partial redundancy elimination of loads and stores. In Proc. of Conf. on Pro- gramming Languages Design and Implementation, pages 26-37, June 1998.
- T. Chen, W. Hsu J. Lin, and P. Yew. An empirical study on the granularity of pointer analysis in c programs. In Workshop on Languages and Compilers for Parallel Computing, pages 151-160, July 2002.
- The suif parallelizing compiler guide. Stanford Compiler Group, 1994.
- D. L. Moore. The suif programmer guide. The Portland Group, Inc, 1999.
- R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for c programs. In Proceedings of the conference on Programming language design and implementation, pages 1-12, June 1995.
- M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of Con- ference on Program Language Design and Implementation, pages 242-256, June 1994.
- M. Hall, J. Anderson, S. Amarasinghe, B. Murphy, and S.W. Liao and. Maximiz- ing multiprocessor performance with the suif compiler. IEEE Computer, Vol. 29, No. 12, pages 84-89, December 1996.
- M. Hind, M. Burke, P. Carini, and J. D. Choi. Interprocedural pointer alias anal- ysis. ACM Transactions on Programming Languages and Systems, Vol 21, No. 4, pages 848-894, July 1999.
- B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of Sym- posium on Principles of Programming Languages, pages 32-41, June 1996.
- M. Shapiro and S. Horwitz. Fast and accurate flow-insensitive points-to analysis. In Proceedings of the Symposium on the Principles of Programming Languages, pages 1-14, January, 1997.
- R. Ghiya, D. Lavery, and D. Sehr. On the importance of points-to analysis and other memory disambiguation methods for c programs. In Proceedings of the Conference on Programming Language Design and Implementation, pages 47- 58, June 2001.
- P. Anderson, D Binkley, G. Rosay, and T. Teitelbaum. Flow insensitive points- to sets. In Proceedings of 1st IEEE International Workshop on Source Code Analysis and Manipulation, pages 81-91, November 2001.
- M. Hind and A. Pioli. Which pointer analysis should i use? In Proceeding of the ACM SIG-SOFT International Symposium on Software and Analysis (ISSTA '00), pages 84-89, Portland, Oregon, August, 2000.
- E. M. Nystrom, H.S. Kim, and W.M. Hwu. Global optimization by suppression of partial redundancies. Intl. Static Analysis Symp, pages 165-180, August 2004.
- B. Cheng and W.-M. Hwu. Modular interprocedural pointer analysis using access paths:design, implementation, and evaluation. Conf. on Programming Language Design and Implementation, pages 57-69, June 2000.
- R. Z. Altucher and W. Landi. An extended form of must alias analysis for dy- namic allocation. Symp. on Principles of Programming Languages, pages 74-84, January 1995.
- R. Ghiya and L. J. Hendren. Is it a tree, a dag, or a cyclic graph? a shape analysis for heap-directed pointers in c. Symp. on Principles of Programming Languages, pages 1-15, January 1996.
- M. Fernandez and R. Espasa. Speculative alias analysis for executable code. Technical Report UPC-DAC-2002-27 1, Computer Architecture Departament, Universitat Politcnica de Catalunya, Barcelona, 2002.
- G. Slavenburg A. S. Huang and J. P. Shen. Speculative disambiguation: A com- pilation technique for dynamic memory disambiguation. In Proceedings of the Int. Sump. on Computer Architecture, pages 200-210, April 1994.
- T. Chen J. Lin, R. D.-C. Ju W.-C. Hsu, T.-F. Ngai, P.-C. Yew, and S. Chan. A com- piler framework for speculative analysis and optimizations. Proceedings of Con- ference on Programming Language Design and Implementation (PLDI), pages 289-299, June 2003.
- T. Chen, X. Dai, J. Lin, W. Hsu, and P. Yew. Data dependence profiling for specu- lative optimizations. In Proceeding of the International Conference on Compiler Construction, 2004.
- M. Mock, M. Das, C. Chambers, , and S. J. Eggers. Dynamic points-to sets: A comparison with static analyses and potential applications in program under- standing and optimization. Wksp. on Program Analysis for Software Tools and Engineering, pages 66-72, June 2001.
- K. D. Cooper, T. J. Harvey, and K. Kennedy. Iterative dataflow analysis, revisited. Programming Language Design and Implementation -PLDI 2003, San Diego, CA, November 2003.
- M. Mock, D. C. Atkinson, C. Chambers, and S. J. Eggers. Improving program slicing with dynamic points-to data. Intl. Symp. on Foundations of Software En- gineering, pages 71-80, November 2002.
- D. Liang, M. Pennings, and M. J. Harrold. Evaluating the precision of static ref- erence analysis using profiling. Tech Report GIT-CC-02-05 1, College of Com- puting -Georgia Institute of Techonology, February 2002.
- W. Landi. Undecidability of static analysis. ACM Letters on Programming Lan- guages and Systems, Vol. 1, No. 4, December 1992.
- M. Sagiv, T. Reps, and R. Wilhelms. Parametric shape analysis via 3-valued logic. Symp. on Principles of Programming Languages, pages 105-118, January 1999.
- Standard performance evaluation corporation. www.spec.org/cpu2000.
- C. Lee, M. Potkonjak, and W. H. Mangione-Smith. Mediabench: A tool for evaluating and synthesizing multimedia and communications systems. Intl. Symp. On Microarchitecture, pages 330-335, December 1997.
- R. Rugina and M. Rinard. Span: A pointer analysis pass. Technical report 1, Laboratory for Computer Science, Massachusetts Institute of Technology, 2000.
- R. Rugina and M. Rinard. Span: A shape and pointer analysis package. Technical report, m.i.t. lcstm-581, M.I.T., 1998.
- E. M. Nystrom, H.S. Kim, and W.M. Hwu. Importance of heap specialization in pointer analysis. Wksp. on Program Analysis for Software Tools and Engineering, pages 43-48, June 2004.