|
ABSTRACT
We present a new limited form of interprocedural analysis called field analysis that can be used by a compiler to reduce the costs of modern language features such as object-oriented programming,
automatic memory management, and run-time checks required for type safety.
Unlike many previous interprocedural analyses, our analysis is cheap, and does not require access to the entire program. Field analysis exploits the declared access restrictions placed on fields in a modular language (e.g. field access modifiers in Java) in order to determine useful properties of fields of an object.
We describe our implementation of field analysis in the Swift
optimizing compiler for Java, as well a set of optimizations that
exploit the results of field analysis. These optimizations include removal of run-time tests, compile-time resolution of method calls, object inlining, removal of unnecessary synchronization, and stack allocation. Our results demonstrate that field analysis is efficient and effective. Speedups average 7% on a wide range of applications, with some times reduced by up to 27%. Compile time overhead of field analysis is about 10%.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Java Memory Model Mailing List. At URL http: //www. cs. umd. edu/"pugh/j ava/memoryModel/.
|
| |
2
|
|
 |
3
|
Bruno Blanchet, Escape analysis for object-oriented languages: application to Java, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.20-34, November 01-05, 1999, Denver, Colorado, United States
|
 |
4
|
Jeff Bogda , Urs Hölzle, Removing unnecessary synchronization in Java, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.35-46, November 01-05, 1999, Denver, Colorado, United States
|
 |
5
|
Jong-Deok Choi , Manish Gupta , Mauricio Serrano , Vugranam C. Sreedhar , Sam Midkiff, Escape analysis for Java, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.1-19, November 01-05, 1999, Denver, Colorado, United States
|
| |
6
|
Compaq Computer Corporation. Compaq Fast Virtual Machine V1.2.2-1 for Alpha. At URL http://www. compaq, com/j ava.
|
| |
7
|
|
| |
8
|
|
| |
9
|
D. L. Detlefs, K. R. M. Leino, G. Nelson, and J. B. Saxe. Extended Static Checking. Technical Report 159, Compaq, 1998.
|
 |
10
|
Amer Diwan , Kathryn S. McKinley , J. Eliot B. Moss, Type-based alias analysis, Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, p.106-117, June 17-19, 1998, Montreal, Quebec, Canada
|
 |
11
|
Amer Diwan , J. Eliot B. Moss , Kathryn S. McKinley, Simple and effective analysis of statically-typed object-oriented programs, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.292-305, October 06-10, 1996, San Jose, California, United States
|
 |
12
|
Julian Dolby , Andrew A. Chien, An evaluation of automatic object inline allocation techniques, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.1-20, October 18-22, 1998, Vancouver, British Columbia, Canada
|
| |
13
|
D. Gay and B. Steensgaard. Stack Allocating Objects in Java. At URL http://www.research.microsoft. com/apl/stackalloc-abstract, ps.
|
| |
14
|
C. Hall, S. L. Peyton-Jones, and P. M. Sansom. Unboxing Using Specialization. In Functional Programming, Glasgow 1995. Workshops in Computing Science. Springer-Verlag, 1995.
|
 |
15
|
|
 |
16
|
|
 |
17
|
|
| |
18
|
D. J. Scales, K. H. Randall, S. Ghemawat, and J. Dean. The Swift Java Compiler: Design and Implementation. Technical Report 2000/2, Compaq Western Research Laboratory, Apr. 2000.
|
 |
19
|
Zhong Shao , John H. Reppy , Andrew W. Appel, Unrolling lists, Proceedings of the 1994 ACM conference on LISP and functional programming, p.185-195, June 27-29, 1994, Orlando, Florida, United States
|
 |
20
|
|
 |
21
|
John Whaley , Martin Rinard, Compositional pointer and escape analysis for Java programs, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.187-206, November 01-05, 1999, Denver, Colorado, United States
|
CITED BY 25
|
|
|
|
|
|
|
|
|
|
|
Mikel Luján , Mikel Luján , John R. Gurd , T. L. Freeman , José Miguel, Elimination of Java array bounds checks in the presence of indirection, Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande, p.76-85, November 03-05, 2002, Seattle, Washington, USA
|
|
|
|
|
|
Ronald Veldema , J. H. Ceriel , F. H. Rutger , E. Henri, Object combining: A new aggressive optimization for object intensive programs, Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande, p.165-174, November 03-05, 2002, Seattle, Washington, USA
|
|
|
Patrice Pominville , Feng Qian , Raja Vallée-Rai , Laurie Hendren , Clark Verbrugge, A framework for optimizing Java using attributes, Proceedings of the 2000 conference of the Centre for Advanced Studies on Collaborative research, p.8, November 13-16, 2000, Mississauga, Ontario, Canada
|
|
|
|
|
|
|
|
|
Christopher Barton , Peng Zhao , Robert Niewiadomski , José Nelson Amaral, Identifying opportunities for automatic remote field cloning, Proceedings of the 2004 conference of the Centre for Advanced Studies on Collaborative research, p.124-134, October 04-07, 2004, Markham, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|