An evaluation of automatic object inline allocation techniques

Object-oriented languages such as Java and Smalltalk provide a uniform object reference model, allowing objects to be conveniently shared. If implemented directly, these uniform reference models can suffer in efficiency due to additional memory dereferences and memory management operations. Automatic inline allocation of child objects within parent objects can reduce overheads of heap-allocated pointer-referenced objects.We present three compiler analyses to identify inlinable fields by tracking accesses to heap objects. These analyses span a range from local data flow to adaptive whole-program, flow-sensitive inter-procedural analysis. We measure their cost and effectiveness on a suite of moderate-sized C++ programs (up to 30,000 lines including libraries). We show that aggressive interprocedural analysis is required to enable object inlining, and our adaptive inter-procedural analysis [23] computes precise information efficiently. Object inlining eliminates typically 40% of object accesses and allocations (improving performance up to 50%). Furthermore,

[1]  Olin Shivers,et al.  Data-flow analysis and type recovery in Scheme , 1990 .

[2]  Guy L. Steele,et al.  Common Lisp the Language , 1984 .

[3]  Laurie J. Hendren,et al.  Extended SSA numbering: introducing SSA properties to languages with multi-level pointers , 1996, CASCON.

[4]  Jens Palsberg,et al.  Type Inference of SELF , 1993, ECOOP.

[5]  Urs Hölzle,et al.  Optimizing dynamically-dispatched calls with run-time type feedback , 1994, PLDI '94.

[6]  Zoran Budimlic,et al.  Optimizing Java: theory and practice , 1997, Concurr. Pract. Exp..

[7]  Craig Chambers,et al.  Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches , 1991, ECOOP.

[8]  Peter G. Harrison,et al.  Functional Programming , 1988 .

[9]  Andrew A. Chien,et al.  Type Directed Cloning for Object-Oriented Programs , 1995, LCPC.

[10]  David Grove,et al.  Selective specialization for object-oriented languages , 1995, PLDI '95.

[11]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[12]  Laurie J. Hendren,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994, PLDI '94.

[13]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[14]  Andrew P. Black,et al.  Object structure in the Emerald system , 1986, OOPLSA '86.

[15]  Kai Li,et al.  Thread scheduling for cache locality , 1996, ASPLOS VII.

[16]  Jens Palsberg,et al.  Analysis of Objects with Dynamic and Multiple Inheritance , 1993 .

[17]  Andrew A. Chien,et al.  Supporting high level programming with high performance: the Illinois Concert system , 1997, Proceedings Second International Workshop on High-Level Parallel Programming Models and Supportive Environments.

[18]  Julian Dolby Automatic inline allocation of objects , 1997, PLDI '97.

[19]  Perry S. Plexico,et al.  Data abstraction and object-oriented programming in C++ , 1990 .

[20]  Niklaus Wirth,et al.  Project Oberon - the design of an operating system and compiler , 1992 .

[21]  Andrew W. Appel,et al.  Unrolling lists , 1994, LFP '94.

[22]  Norman C. Hutchinson,et al.  EMERALD: An object-based language for distributed programming , 1987 .

[23]  Peter Lee,et al.  Topics in advanced language implementation , 1991 .

[24]  Andrew A. Chien,et al.  Optimization of object-oriented and concurrent programs , 1996 .

[25]  Craig Chambers,et al.  Iterative type analysis and extended message splitting; optimizing dynamically-typed object-oriented programs , 1990, PLDI '90.

[26]  Pierre America,et al.  Inheritance and Subtyping in a Parallel Object-Oriented Language , 1987, ECOOP.

[27]  Andrew P. Black,et al.  Object structure in the Emerald system , 1986, OOPSLA 1986.

[28]  Xavier Leroy,et al.  Unboxed objects and polymorphic typing , 1992, POPL '92.

[29]  Bjarne Stroustrup,et al.  The Annotated C++ Reference Manual , 1990 .

[30]  Dirk Grunwald,et al.  Quantifying Behavioral Differences Between C and C++ Programs , 1994 .

[31]  Olin Shivers,et al.  Control flow analysis in scheme , 1988, PLDI '88.

[32]  Frank Pfenning,et al.  Refinement types for ML , 1991, PLDI '91.

[33]  Jens Palsberg,et al.  Object-oriented type inference , 1991, OOPSLA '91.