Field analysis: Getting useful and low-cost interprocedural information

Citation
S. Ghemawat et al., Field analysis: Getting useful and low-cost interprocedural information, ACM SIGPL N, 35(5), 2000, pp. 334-344
Citations number
20
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
35
Issue
5
Year of publication
2000
Pages
334 - 344
Database
ISI
SICI code
1523-2867(200005)35:5<334:FAGUAL>2.0.ZU;2-9
Abstract
We present a new limited form of interprocedural analysis called field anal ysis 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 interpro cedural analyses, our analysis is cheap, and does not require access to the entire program. Field analysis exploits the declared access restrictions p laced 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 co mpiler for Java, as well a set of optimizations that exploit the results of field analysis. These optimizations include removal of run-time tests, com pile-time resolution of method calls, object inlining, removal of unnecessa ry synchronization, and stack allocation. Our results demonstrate that fiel d analysis is efficient and effective. Speedups average 7% on a wide range of applications, with some times reduced by up to 27%. Compile time overhea d of field analysis is about 10%.