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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
L. Andersen. Program analysis and specialization for the C programming language. PhD thesis, DIKU, University of Copenhagen, May 1994. DIKU report 94/19.
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.
R. Chatterjee, B. Ryder, and W. Landi. Relevant context inference. In 26th ACM SIGPLAN Symposium on Principles of Programming Languages, 1999.
M. Das. Unification-based pointer analysis with directional assignments. In Proceedings of the SIGPLAN 2000 Conference on Programming Language Design and Implementation, 2000.
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.
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.
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.
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.
F. Henglein. Type inference with polymorphic recursion. ACM Trans. Program. Lang. Syst., 15(2):253–289, 1993.
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.
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.
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.
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.
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.
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.
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.
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.
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.
E. Ruf. Context-sensitive alias analysis reconsidered. Proceedings of the ACM SIGPLAN 95 Conference on Programming Language Design and Implementation, 1995.
E. Ruf. Effective synchronization removal for Java. In Proceedings of the SIGPLAN 2000 Conference on Programming Language Design and Implementation, 2000.
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.
B. Steensgaard. Points-to analysis in almost linear time. In Conference Record of the 23rd ACM Symposium on Principles of Programming Languages, 1996.
F. Tip. A survey of program slicing techniques. Journal of Programming Languages, 3(3):121–189, 1995.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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