Abstract
In theory, increasing alias analysis precision should improve compiler optimizations on C programs. This paper compares alias analysis algorithms on scalar optimizations, including an analysis that assumes no aliases, to establish a very loose upper bound on optimization opportunities. We then measure optimization opportunities on thirty-six C programs. In practice, the optimizations are rarely inhibited due to the precision of the alias analyses. Previous work finds similarly that the increased precision of specific alias algorithms provide little benefit for scalar optimizations, and that simple static alias algorithms find almost all dynamically determined aliases. This paper, however, is the first to provide a static methodology that indicates that additional precision is unlikely to yield improvements for a set of optimizations. For clients with higher alias accuracy demands, this methodology can help pinpoint the need for additional accuracy.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (May 1994)
Austin, T.: Pointer-intensive benchmark suite, version 1.1 (1995), http://www.cs.wisc.edu/~austin/ptr-dist.html
Bacon, D.F., Sweeney, P.F.: Fast static analysis of C++ virtual function calls. In: ACM Conference Proceedings on Object–Oriented Programming Systems, Languages, and Applications, San Jose, CA, October 1996, pp. 324–341 (1996)
Briggs, P., Cooper, K.D., Simpson, L.T.: Value numbering. Software—Practice and Experience 27(6), 701–724 (1997)
Choi, J., Burke, M., Carini, P.: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: Proceedings of the 20th Annual ACM Symposium on the Principles of Programming Languages, Charleston, SC, January 1993, pp. 232–245 (1993)
Chow, F., Chan, S., Kennedy, R., Lo, S., Tu, P.: A new algorithm for partial redundancy elimination based on SSA form. In: Proceedings of the SIGPLAN 1997 Conference on Programming Language Design and Implementation, Las Vegas, NV, June 1997, pp. 273–286 (1997)
Chow, F., Chan, S., Liu, S., Lo, R., Streich, M.: Effective representation of aliases and indirect memory operations in SSA form. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 253–267. Springer, Heidelberg (1996)
Chowdhury, R.A., Djeu, P., Cahoon, B., Burrill, J.H., McKinley, K.S.: The limits of alias analysis for scalar optimizations. Technical Report TR-03-059, University of Texas at Austin (October 2003)
Cooper, K.D., Kennedy, K.: Fast interprocedural alias analysis. In: Proceedings of the 16th Annual ACM Symposium on the Principles of Programming Languages, pp. 49–59 (1989)
Cooper, K.D., Lu, J.: Register promotion in C programs. In: Proceedings of the SIGPLAN 1997 Conference on Programming Language Design and Implementation, Las Vegas, NV, June 1997, pp. 308–319 (1997)
Cytron, R., Ferrante, J., Rosen, B., Wegman, M., Zadeck, K.: An efficient method of computing static single assignment form. In: Proceedings of the 16th Annual ACM Symposium on the Principles of Programming Languages, Austin, TX, January 1989, pp. 25–35 (1989)
Das, M., Liblit, B., Fahndrich, M., Rehof, J.: Estimating the impact of scalable pointer analysis on optimization. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 260–278. Springer, Heidelberg (2001)
Diwan, A., McKinley, K.S., Moss, J.E.B.: Type-based alias analysis. In: Proceedings of the SIGPLAN 1998 Conference on Programming Language Design and Implementation, Montreal, June 1998, pp. 106–117 (1998)
Diwan, A., McKinley, K.S., Moss, J.E.B.: Using types to analyze and optimize objectoriented programs. ACM Transactions on Programming Languages and Systems 23(1), 30–72 (2001)
Diwan, A., Moss, J.E.B., McKinley, K.S.: Simple and effective analysis of statically-typed object-oriented languages. In: ACM Conference Proceedings on Object–Oriented Programming Systems, Languages, and Applications, San Jose, CA, October 1996, pp. 344–355 (1996)
Emami, M., Ghiya, R., Hendren, L.J.: Context-sensitive interprocedural points-to analysis in the presence of function pointers. In: Proceedings of the SIGPLAN 1994 Conference on Programming Language Design and Implementation, June 1994, pp. 242–256 (1994)
Ghiya, R., Hendren, L.J.: Putting pointer analysis to work. In: Proceedings of the 25th Annual ACM Symposium on the Principles of Programming Languages, San Diego, CA (January 1998)
Guyer, S.Z., Lin, C.: Client-driven pointer analysis. In: International Static Analysis Symposium, San Diego, CA, June 2003, pp. 214–236 (2003)
Heine, D.L., Lam, M.S.: A practical flow-sensitive and context-sensitive C and C++ memory leak detector. In: Proceedings of the SIGPLAN 2003 Conference on Programming Language Design and Implementation, San Diego, CA, June 2003, pp. 168–181 (2003)
Hind, M., Pioli, A.: Assessing the effects of flow-sensitivity on pointer alias analysis. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 57–81. Springer, Heidelberg (1998)
Hind, M., Pioli, A.: Which pointer analysis should I use? In: Proceediings of the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2000), Portland, OR, August 2000, pp. 112–123 (2000)
Landi, W., Ryder, B.G., Zhang, S.: Interprocedural modification side effect analysis with pointer aliasing. ACM SIGPLAN Notices 28(6), 56–67 (1993)
Liang, D., Harrold, M.J.: Efficient points-to analysis for whole-program analysis. In: Proceedings of the 7th ACM SIGSOFT International Symposium on the Foundations of Software Engineering, Toulouse, France, September 1999, pp. 199–215 (1999)
McKinley, K.S., Burrill, J., Cahoon, B., Moss, J.E.B., Wang, Z., Weems, C.: The Scale compiler. Technical report, University of Massachusetts (2001), http://ali-www.cs.umass.-edu/Â scale/
Ruf, E.: Context-insensitive alias analysis reconsidered. In: Proceedings of the SIGPLAN 1995 Conference on Programming Language Design and Implementation, La Jolla, CA, June 1995, pp. 13–22 (1995)
Rutgers. PROLANGS benchmark suite, data programs (1999), http://www.prolangs.rutgers.edu/public.html
Shapiro, M., Horwitz, S.: The effects of the precision of pointer analysis. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 16–34. Springer, Heidelberg (1997)
Shapiro, M., Horwitz, S.: Fast and accurate flow-insensitive points-to analysis. In: Proceedings of the 24th Annual ACM Symposium on the Principles of Programming Languages, Paris, France, January 1997, pp. 1–14 (1997)
Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd Annual ACM Symposium on the Principles of Programming Languages, St. Petersburg, FL, January 1996, pp. 21–24 (1996)
Stocks, P.A., Ryder, B.G., Landi, W., Zhang, S.: Comparing flow and context sensitivity on the modifications-side-effects problem. In: Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis, Clearwater, FL, March 1998, pp. 21–31 (1998)
Traub, O., Haolloway, G., Smith, M.D.: Quality and speed in linear-scan register allocation. In: Proceedings of the SIGPLAN 1998 Conference on Programming Language Design and Implementation, Montreal, June 1998, pp. 142–151 (1998)
Wang, Z., Burger, D., McKinley, K.S., Reinhardt, S., Weems, C.C.: Guided region prefetching: A cooperative hardware/software approach. In: Proceedings of the 30th International Symposium on Computer Architecture, San Diego, CA, June 2003, pp. 388–398 (2003)
Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems 13(2), 181–210 (1991)
Wilson, R.P., Lam, M.S.: Efficient context-sensitive pointer analysis for C programs. In: Proceedings of the SIGPLAN 1995 Conference on Programming Language Design and Implementation, La Jolla, CA, June 1995, pp. 1–12 (1995)
Yong, S.H., Horwitz, S., Reps, T.: Pointer analysis for programs with structures and casting. In: Proceedings of the SIGPLAN 1999 Conference on Programming Language Design and Implementation, Atlanta, GA, June 1999, pp. 91–103 (1999)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chowdhury, R.A., Djeu, P., Cahoon, B., Burrill, J.H., McKinley, K.S. (2004). The Limits of Alias Analysis for Scalar Optimizations. In: Duesterwald, E. (eds) Compiler Construction. CC 2004. Lecture Notes in Computer Science, vol 2985. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24723-4_3
Download citation
DOI: https://doi.org/10.1007/978-3-540-24723-4_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21297-3
Online ISBN: 978-3-540-24723-4
eBook Packages: Springer Book Archive