Skip to main content

Estimating the Impact of Scalable Pointer Analysis on Optimization

  • Conference paper
  • First Online:
Static Analysis (SAS 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2126))

Included in the following conference series:

Abstract

This paper addresses the following question: Do scalable control-flow-insensitive pointer analyses provide the level of precision required to make them useful in compiler optimizations?

We first describe alias frequency, a metric that measures the ability of a pointer analysis to determine that pairs of memory accesses in C programs cannot be aliases. We believe that this kind of information is useful for a variety of optimizations, while remaining independent of a particular optimization. We show that control-flow and context insensitive analyses provide the same answer as the best possible pointer analysis on at least 95% of all statically generated alias queries. In order to understand the potential run-time impact of the remaining 5% queries, we weight the alias queries by dynamic execution counts obtained from profile data. Flow-insensitive pointer analyses are accurate on at least 95% of the weighted alias queries as well.

We then examine whether scalable pointer analyses are inaccurate on the remaining 5% alias queries because they are context-insensitive. To this end, we have developed a new context-sensitive pointer analysis that also serves as a general engine for tracing the flow of values in C programs. To our knowledge, it is the first technique for performing context-sensitive analysis with subtyping that scales to millions of lines of code. We find that the new algorithm does not identify fewer aliases than the context-insensitive analysis.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. L. Andersen. Program analysis and specialization for the C programming language. PhD thesis, DIKU, University of Copenhagen, May 1994. DIKU report 94/19.

    Google Scholar 

  2. B. Cheng and W. Hwu. Modular interprocedural pointer analysis using access paths: Design, implementation, and evaluation. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation, 2000.

    Google Scholar 

  3. R. Chatterjee, B. Ryder, and W. Landi. Relevant context inference. In 26th ACM SIGPLAN Symposium on Principles of Programming Languages, 1999.

    Google Scholar 

  4. M. Das. Unification-based pointer analysis with directional assignments. In Proceedings of the SIGPLAN 2000 Conference on Programming Language Design and Implementation, 2000.

    Google Scholar 

  5. A. Diwan, S. McKinley, and J. Eliot Moss. Type-based alias analysis. In Proceedings of the ACM SIGPLAN 98 Conference on Programming Language Design and Implementation, 1998.

    Google Scholar 

  6. M. Emami, R. Ghiya, and L. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the ACM SIGPLAN 94 Conference on Programming Language Design and Implementation, 1994.

    Google Scholar 

  7. J. S. Foster, M. Fähndrich, and A. Aiken. Polymorphic versus monomorphic flow-insensitive points-to analysis for C. In Proceedings of the 7’th International Static Analysis Symposium, 2000.

    Google Scholar 

  8. M. Fähndrich, J. Rehof, and M. Das. Scalable context-sensitive flow analysis using instantiation constraints. In Proceedings of the ACM Conference on Programming Language Design and Implementation, 2000.

    Google Scholar 

  9. F. Henglein. Type inference with polymorphic recursion. ACM Trans. Program. Lang. Syst., 15(2):253–289, 1993.

    Article  Google Scholar 

  10. M. Hind and A. Pioli. Assessing the effects of flow-sensitivity on pointer alias analyses. In Fifth International Static Analysis Symposium, Pisa, Italy, number 1503 in LNCS, pages 57–81. Springer-Verlag, 1998.

    Google Scholar 

  11. S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In ACM SIGSOFT Symposium on the Foundations of Software Engineering, SIGSOFT Software Engineering Notes 20, 4, 1995.

    Google Scholar 

  12. D. Liang and M. Harrold. Efficient points-to analysis for whole program analysis. In Proceedings of the 7th ACM SIGSOFT Symposium on the Foundations of Software Engineering, 1999.

    Google Scholar 

  13. D. Liang and M. Harrold. Light-weight context recovery for efficient and accurate program analyses. In Proceedings of the 22nd International Conference on Software Engineering, June 2000.

    Google Scholar 

  14. W. Landi and B. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In Proceedings of the ACM SIGPLAN 92 Conference on Programming Language Design and Implementation, 1992.

    Google Scholar 

  15. M. Mock, C. Chambers, and S. J. Eggers. Calpa: A tool for automating selective dynamic compilation. In In 33rd Annual International Symposium on Microarchitecture, December 2000, (Micro-33), Monterrey, California, December 2000.

    Google Scholar 

  16. J. Rehof and M. Fähndrich. Type-based flow analysis: From polymorphic subtyping to CFL-Reachability. In Proceedings of the 28th Annual ACM Symposium on Principles of Programming Languages, January 2001.

    Google Scholar 

  17. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Symposium on Principles of Programming Languages (POPL), San Francisco, California, 1995.

    Google Scholar 

  18. A. Rountev, B. Ryder, and W. Landi. Data-flow analysis of program fragments. In Proceedings of the 7th European Software Engineering Conference and 7th ACM SIGSOFT Symposium on the Foundations of Software Engineering, 1999.

    Google Scholar 

  19. E. Ruf. Context-sensitive alias analysis reconsidered. Proceedings of the ACM SIGPLAN 95 Conference on Programming Language Design and Implementation, 1995.

    Google Scholar 

  20. E. Ruf. Effective synchronization removal for Java. In Proceedings of the SIGPLAN 2000 Conference on Programming Language Design and Implementation, 2000.

    Google Scholar 

  21. M. Shapiro and S. Horwitz. The effects of the precision of pointer analysis. In LNCS 1302, 4th International Symposium on Static Analysis. Springer-Verlag, 1997.

    Google Scholar 

  22. B. Steensgaard. Points-to analysis in almost linear time. In Conference Record of the 23rd ACM Symposium on Principles of Programming Languages, 1996.

    Google Scholar 

  23. F. Tip. A survey of program slicing techniques. Journal of Programming Languages, 3(3):121–189, 1995.

    Google Scholar 

  24. R. Wilson and M. Lam. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the SIGPLAN 95 Conference on Programming Language Design and Implementation, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Das, M., Liblit, B., Fähndrich, M., Rehof, J. (2001). Estimating the Impact of Scalable Pointer Analysis on Optimization. In: Cousot, P. (eds) Static Analysis. SAS 2001. Lecture Notes in Computer Science, vol 2126. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47764-0_15

Download citation

  • DOI: https://doi.org/10.1007/3-540-47764-0_15

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-42314-0

  • Online ISBN: 978-3-540-47764-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics