Skip to main content

Context-sensitive interprocedural analysis in the presence of dynamic aliasing

  • Program Analysis
  • Conference paper
  • First Online:
Languages and Compilers for Parallel Computing (LCPC 1996)

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

Abstract

Context-sensitive interprocedural data-flow analysis, for problems where the flow value is a mapping from symbols to values from an abstract domain, requires solutions to be computed for differing aliasing conditions existing at distinct calling contexts. This paper presents an approach for computing context-sensitive solutions to forward, monotone data-flow problems for statically allocated scalar variables that does not require reanalysis of procedures. The algorithm handles dynamic aliasing, due to non-recursive pointer types, and recursion. This paper applies the technique to constant propagation for statically allocated scalars.

We propose an elimination-style approach that computes a single canonical transfer function for a procedure, under the assumption that no aliases hold between its arguments (including both explicitly and implicitly passed globals) on entry. The canonical transfer functions are expressed as a set of parameterised data flow mappings, augmented with sequence tokens and alias assertions. The sequence tokens and alias assertions succinctly capture sufficient control-flow and alias conditions, respectively, so that accurate solutions in the presence of aliasing can be computed from the canonical one. The information represented by the sequence tokens allows approximations that yield conservative solutions, with varying levels of flow and context sensitivity.

This research was supported in part by the Air Force Material Command and DARPA under the contract F30602-95-C-0098 and an NSF Young Investigator award.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Michael Burke, Paul Carini, Jong-Deok Choi, and Michael Hind. Flow-insensitive interprocedural alias analysis in the presence of function pointers. In K. Pingali, U. Banerjee, D. Gelernter, A. Nicolau, and D. Padua, editors, Lecture Notes in Computer Science, 892, pages 234–250. Springer-Verlag, 1995. Proceedings from the 7th International Workshop on Languages and Compilers for Parallel Computing. Extended version published as Research Report RC-19546, IBM T. J. Watson Research Center, September, 1994.

    Google Scholar 

  2. Jong-Deok Choi, Michael Burke, and Paul Carini. Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In Proceedings of the 20th Annual ACM Symposium on Principles of Programming Languages, pages 232–245, January 1993.

    Google Scholar 

  3. Jong-Deok Choi, Ron Cytron, and Jeanne Ferrante. Automatic construction of sparse data flow evaluation graphs. In Proceedings of the 18th Annual ACM Symposium on Principles of Programming Languages, pages 55–66, January 1991.

    Google Scholar 

  4. David Callahan, Keith D. Cooper, Ken Kennedy, and Linda Torczon. Interprocedural constant propagation. In Proceedings of the ACM SIGPLAN'86 Symposium on Compiler Construction, pages 152–161, July 1986.

    Google Scholar 

  5. Paul R. Carini and Michael Hind. Flow-sensitive interprocedural constant propagation. Technical Report RC 20290, IBM Research Division, T.J. Watson Research Center, 1995.

    Google Scholar 

  6. Paul R. Carini, Harini Srinivasan, and Michael Hind. Flow-sensitive type analysis for c++. Technical Report RC 20267, IBM Research Division, T.J. Watson Research Center, 1995.

    Google Scholar 

  7. Maryam Emami, Rakesh Ghiya, and Laurie J. 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, pages 242–256, June 1994.

    Google Scholar 

  8. Rakesh Ghiya. Practical techniques for interprocedural heap analysis. Master's thesis, School of Computer Science, McGill University, March 1995.

    Google Scholar 

  9. William Landi and Barbara G. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In Proceedings of the ACM SIGPLAN'92 Conference on Programming Language Design and Implementation, pages 235–248, June 1992.

    Google Scholar 

  10. Thomas Lengauer and Robert E. Tarjan. A fast algorithm for finding dominators in a flow-graph. ACM Transactions on Programming Languages and Systems, 1(1):121–141, July 1979.

    Article  Google Scholar 

  11. M. Sharir and A. Pnueli. Two approaches to interprocedural data-flow analyis. In S.S. Muchnick and N. D. Jones, editors, Program Flow Analysis: Theory and Applications, chapter 7, pages 189–234. Prentice-Hall, 1981.

    Google Scholar 

  12. Robert E. Tarjan. Fast algorithms for solving path problems. Journal of the ACM, 28(3):594–614, July 1981.

    Article  Google Scholar 

  13. J. D. Ullman and M. S. Hecht. A simple algorithm for global fata flow analysis. SIAM J. Computing, 4:519–532, 1975.

    Article  Google Scholar 

  14. Robert P. Wilson and Monica S. Lam. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the ACM SIGPLAN'95 Conference on Programming Language Design and Implementation, pages 1–12, June 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

David Sehr Utpal Banerjee David Gelernter Alex Nicolau David Padua

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sathyanathan, P.W., Lam, M.S. (1997). Context-sensitive interprocedural analysis in the presence of dynamic aliasing. In: Sehr, D., Banerjee, U., Gelernter, D., Nicolau, A., Padua, D. (eds) Languages and Compilers for Parallel Computing. LCPC 1996. Lecture Notes in Computer Science, vol 1239. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0017248

Download citation

  • DOI: https://doi.org/10.1007/BFb0017248

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63091-3

  • Online ISBN: 978-3-540-69128-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics