Field analysis
Sanjay Ghemawat, Keith H. Randall, Daniel J. Scales · Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation · 2000
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%.
Cited by 55 works. doi:10.1145/349299.349343
Authors
References
- A fast algorithm for finding dominators in a flowgraph
- Extended static checking
- Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis
- Escape analysis for Java
- Compositional pointer and escape analysis for Java programs
- Escape analysis for object-oriented languages
- Unboxed objects and polymorphic typing
- Removing unnecessary synchronization in Java
- Static Analyses for Eliminating Unnecessary Synchronization from Java Programs
- Type-based alias analysis