Abstract
A fast and scalable interprocedural escape analysis algorithm is presented. The analysis computes a description of a subset of created objects whose lifetime is bounded by the lifetime of a runtime stack frame. The analysis results can be used for many purposes, including stack allocation of objects, thread synchronization elimination, dead-store removal, code motion, and iterator reduction. A method to use the analysis results for transforming a program to allocate some objects on the runtime stack is also presented. For non-trivial programs, typically 10%–20% of all allocated objects are placed on the runtime stack after the transformation.
The work was performed while the author was working at Microsoft Research.
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
Jeffrey M. Barth. Shifting garbage collection overhead to compile time. Communications of the ACM, 20(7):513–518, July 1977. 90
Jeff Bogda and Urs Hölzle. Removing Unnecessary Synchronization in Java. In Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’ 99), pages 35–46. ACM Press, October 1999. 90
Bruno Blanchet. Escape Analysis for Object-Oriented Languages: Application to Java. In Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’ 99), pages 20–34. ACM Press, October 1999. 90
Bruno Blanchet. Escape analysis: Correctness proof, implementation and experimental results. In Conference Record of POPL’ 98: The 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 25–37, San Diego, California, January 98. 90
E. Barendsen and S. Smetsers. Conventional and uniqueness typing in graph rewrite systems. In Rudrapatna K. Shyamasundar, editor, Proceedings of Foundations of Software Technology and Theoretical Computer Science, volume 761 of LNCS, pages 41–51, Bombay, India, December 1993. Springer-Verlag. 90
David F. Bacon and Peter F. Sweeney. Fast static analysis of C++ virtual function calls. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, volume 31, 10 of ACM SIGPLAN Notices, pages 324–341, New York, October6–10 1996. ACM Press. 85
[CFR+91]_Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451–490, October 1991. 83
[CGS+99]_Jong-Deok Choi, M. Gupta, Mauricio Serrano, Vugranam C Shreedhar, and Sam Midkiff. Escape Analysis for Java. In Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’99), pages 1–19. ACM Press, October 1999. 90
David R. Chase, Mark Wegman, and F. Kenneth Zadeck. Analysis of pointers and structures. ACM SIGPLAN Notices, 25(6):296–310, June 1990. 90
Julian Dolby and Andrew A. Chien. An Evaluation of Automatic Object Inline Allocation Techniques. In Proceedings of the 1998 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’98), pages 1–20. ACM Press, October 1998. 91
Alan Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In ACM-SIGPLAN ACM-SIGACT, editor, Conference Record of the 17th Annual ACM Symposium on Principles of Programming Languages (POPL’ 90), pages 157–168, San Francisco, CA, USA, January 1990. ACM Press. 90
Alain Deutsch. On the complexity of escape analysis. In Conference Record of POPL’ 97: The 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 358–371, Paris, France, January 97. 90
[FKR+99]_Robert Fitzgerald, Todd B. Knoblock, Erik Ruf, Bjarne Steensgaard, and David Tarditi. Marmot: An optimizing compiler for Java. Technical Report MSR-TR-99-33, Microsoft Research, June 1999. Accepted for publication in Software — Practice & Experience. 89
James Hicks. Experiences with compiler-directed storage reclamation. In R. John M. Hughes, editor, Record of the 1993 Conference on Functional Programming and Computer Architecture, volume 523 of Lecture Notes in Computer Science, Copenhagen, June 1993. Springer-Verlag. 90
Simon Hughes. Compile-time garbage collection for higher-order functional languages. Journal of Logic and Computation, 2(4):483–509, August 1992. 90
Katsuro Inoue, Hiroyuki Seki, and Hikaru Yagi. Analysis of functional programs to detect run-time garbage cells. ACM Transactions on Programming Languages and Systems, 10(4):555–578, October 1988. 90
S. B. Jones and D. Le Métayer. Compile-time garbage collection by sharing analysis. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture’ 89, Imperial College, London, pages 54–74, New York, NY, 1989. ACM. 90
Neil D. Jones and Steven S. Muchnick. Flow analysis and optimization of Lisp-like structures. In Steven S. Muchnick and Neil D. Jones, editors, Program Flow Analysis: Theory and Applications, pages 102–131. Englewood Cliffs, N.J.: Prentice-Hall, 1981. 90
Thomas P. Jensen and Torben Mogensen. A backwards analysis for compile-time garbage collection. In Neil D. Jones, editor, ESOP’90 3rd European Symposium on Programming, Copenhagen, Denmark, May 1990. (Lecture Notes in Computer Science, vol. 432), pages 227–239. Springer-Verlag, 1990. 90
Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, second edition edition, 1999. 83
Markus Mohnen. Efficient compile-time garbage collection for arbitrary data structures. Technical Report 95-08, RWTH Aachen, Department of Computer Science, 1995. 90
Young Gil Park and Benjamin Goldberg. Escape analysis on lists. In Proceedings of the ACM SIGPLAN’92 Conference on Programming Language Design and Implementation (PLDI), pages 116–127, 1992. 90
Jakob Rehof and Torben Æ. Mogensen. Tractable constraints in finite semilattices. Science of Computer Programming, 35(2–3):191–221, 1998. 91
J.T. Schwartz. Optimization of very high level languages-I. Value transmission and its corollaries. Computer Languages, 1(2):161–194, 1975. 90
Manuel Serrano and Marc Feeley. Storage use analysis and its applications. In Proceedings of the 1st International Conference on Functional Programming, June 1996. 90
Bjarne Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 32–41, St. Petersburg, Florida, January 1996. 91
Jan Vitek, R. Nigel Horspool, and James Uhl. Compile-time analysis of object-oriented programs. In Proceedings of the 4th Int. Conf. on Compiler Construction, CC’92, Paderborn, Germany, 1992. Springer-Verlag. 90
John Whaley and Martin Rinard. Compositional Pointer and Escape Analysis for Java Programs. In Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’99), pages 187–206. ACM Press, October 1999. 90
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gay, D., Steensgaard, B. (2000). Fast Escape Analysis and Stack Allocation for Object-Based Programs. In: Watt, D.A. (eds) Compiler Construction. CC 2000. Lecture Notes in Computer Science, vol 1781. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46423-9_6
Download citation
DOI: https://doi.org/10.1007/3-540-46423-9_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67263-0
Online ISBN: 978-3-540-46423-5
eBook Packages: Springer Book Archive