10.1145/379605.379671acmconferencesArticle/Chapter ViewAbstractPublication PagespasteConference Proceedings
Article

Dynamic points-to sets: a comparison with static analyses and potential applications in program understanding and optimization

ABSTRACT

In this paper, we compare the behavior of pointers in C programs, as approximated by static pointer analysis algorithms, with the actual behavior of pointers when these programs are run. In order to perform this comparison, we have implemented several well known pointer analysis algorithms, and we have built an instrumentation infrastructure for tracking pointer values during program execution.

Our experiments show that for a number of programs from the Spec95 and Spec2000 benchmark suites, the pointer information produced by existing scalable static pointer analyses is far worse than the actual behavior observed at run-time. These results have two implications. First, a tool like ours can be used to supplement static program understanding tools in situations where the static pointer information is too coarse to be usable. Second, a feedback-directed compiler can use profile data on pointer values to improve program performance by ignoring aliases that do not arise at run time (and inserting appropriate run-time checks to ensure safety). As an example, we were able to obtain a factor of 6 speedup on a frequently executed routine from m88ksim.

References

  1. 1.L. Anderson. Program Analysis and specialization for the C programming language. Ph.D. thesis, DIKU, University of Copenhagen, May 1994. DIKU report 94/19.]]Google ScholarGoogle Scholar
  2. 2.T. Austin, S. E. Breach, and G. S. Sohi. Efficient detection of all pointer and array access errors. In SIGPLAN '94 Conference on Programming Language Design and Implementation, pages 290-301, June 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.D. Bernstein, D. Cohen, and D. E. Maydan. Dynamic memory disambiguation for array references. In Proceedings of the 27th International Symposium on Microarchitecture, pages 105-111, November 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.J. D. Choi, M. Burke, and P. Carini. Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In 20th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 232-245, January 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.M. Das. Unification-Based Pointer Analysis with Directional Assignments. In SIGPLAN '00 Conference on Programming Language Design and Implementation, pages 35-46, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.M. Das, B. Liblit, M. Fahndrich, and J. Rehof. Estimating the impact of scalable pointer analysis on optimization. Microsoft Research Technical Report 2001-20. January 2001. Also to appear in Proceedings of 8th International Static Analysis Symposium, July 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.A. Diwan, K. S. McKinley, and J. E. Moss. Type-Based Alias Analysis. in SIGPLAN '98 Conference on Programming Language Design and Implementation, pages 106-117, June 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In SIGPLAN '94 Conference on Programming Language Design and Implementation, pages 242-256, June 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.R. Ghiya and L.J. Hendren. Connection analysis: A practical interprocedural heap analysis for C. International Journal of Parallel Programming, 24(6):547-578, December 1996.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.G. Holloway and C. Young. The flow and analysis libraries of machine SUIF. In Proceedings of the 2nd SUIF Compiler Workshop, August 1997.]]Google ScholarGoogle Scholar
  11. 11.M. Hind and A. Pioli. Which pointer analysis should I use? In ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2000), pages 113-123, August 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.W. Landi and B. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In SIGPLAN '92 Conference on Programming Language Design and Implementation, pages 56-67, June 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.D.Liang and M. J. Harrold. Efficient points-to analysis for whole-program analysis. In Proceedings of the 7th European Software Engineering Conference and ACM SIGSOFT Foundations of Software Engineering, pages 199-215, September 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.M. Mock, M. Berryman, C. Chambers, and S.J. Eggers. Calpa: A tool for automating dynamic compilation. In 2nd Workshop on Feedback-Directed Optimization, November 1999.]]Google ScholarGoogle Scholar
  15. 15.M. Mock, C. Chambers, and S. J. Eggers: Calpa: A Tool for Automating Selective Dynamic Compilation. In Proceedings of the 33rd Annual Symposium on Microarchitecture, pages 291-302, December 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.M. Postiff, D. Greene, and T. Mudge. The store-load address table and speculative register promotion. In Proceedings of the 33rd Annual Symposium on Microarchitecture, pages 235-244, December 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.G. Ramalingam. The undecidability of aliasing. ACM Transactions on Programming Languages and Systems, 16(5):1467-1471, September 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.M. Shapiro and S. Horwitz. Fast and Accurate Flow- Insensitive Points-To Analysis. In Conference Record of POPL'97: Symposium on Principles of Programming Languages, January 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.M. D. Smith. Extending SUIF for machine-dependent optimizations. In Proceedings of the first SUIF compiler workshop, pages 14-15, January 1996.]]Google ScholarGoogle Scholar
  20. 20.B. Steensgaard. Points-to analysis in almost linear time. In Symposium on Principles of Programming Languages, pages 32-41, January 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.R.P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for C program. In SIGPLAN '95 Conference on Programming Language Design and Implementation, pages 1-12, June 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.S. H. Yong, S.Horwitz, and T. Reps. Pointer analysis for programs with structures and casting. In SIGPLAN '99 Conference on Programming Language Design and Implementation, pages 91-103, May 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dynamic points-to sets: a comparison with static analyses and potential applications in program understanding and optimization

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!