Effectiveness of cross-platform optimizations for a java just-in-time compiler

This paper describes the system overview of our Java Just-In-Time (JIT) compiler, which is the basis for the latest production version of IBM Java JIT compiler that supports a diversity of processor architectures including both 32-bit and 64-bit modes, CISC, RISC, and VLIW architectures. In particular, we focus on the design and evaluation of the cross-platform optimizations that are common across different architectures. We studied the effectiveness of each optimization by selectively disabling it in our JIT compiler on three different platforms: IA-32, IA-64, and PowerPC. Our detailed measurements allowed us to rank the optimizations in terms of the greatest performance improvements with the smallest compilation times. The identified set includes method inlining only for tiny methods, exception check eliminations using forward dataflow analysis and partial redundancy elimination, scalar replacement for instance and class fields using dataflow analysis, optimizations for type inclusion checks, and the elimination of merge points in the control flow graphs. These optimizations can achieve 90% of the peak performance for two industry-standard benchmark programs on these platforms with only 34% of the compilation time compared to the case for using all of the optimizations.

[1]  Vivek Sarkar,et al.  Dependence Analysis for Java , 1999, LCPC.

[2]  David Detlefs,et al.  Inlining of Virtual Methods , 1999, ECOOP.

[3]  Roy Dz-Ching Ju,et al.  Translating Out of Static Single Assignment Form , 1999, SAS.

[4]  Kiyokuni Kawachiya,et al.  A study of locking objects with bimodal fields , 1999, OOPSLA '99.

[5]  Ken Kennedy,et al.  Conversion of control dependence to data dependence , 1983, POPL '83.

[6]  J. Moss,et al.  Older-first garbage collection in practice: evaluation in a Java Virtual Machine , 2003, MSP '02.

[7]  Toshiaki Yasue,et al.  An Empirical Study of Method In-lining for a Java Just-in-Time Compiler , 2002, Java Virtual Machine Research and Technology Symposium.

[8]  Matthew Arnold Online instrumentation and feedback directed optimization of Java , 2002 .

[9]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[10]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[11]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[12]  Scott Mahlke,et al.  Sentinel scheduling: a model for compiler-controlled speculative execution , 1993 .

[13]  Rajiv Gupta,et al.  Optimizing array bound checks using flow analysis , 1993, LOPL.

[14]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[15]  Toshio Nakatani,et al.  A study of exception handling and its dynamic optimization in Java , 2001, OOPSLA '01.

[16]  Toshiaki Yasue,et al.  Overview of the IBM Java Just-in-Time Compiler , 2000, IBM Syst. J..

[17]  Mauricio J. Serrano,et al.  Thin locks: featherweight Synchronization for Java , 2004, SIGP.

[18]  Scott Mahlke,et al.  Effective compiler support for predicated execution using the hyperblock , 1992, MICRO 1992.

[19]  Cliff Click,et al.  The Java HotSpot Server Compiler , 2001, Java Virtual Machine Research and Technology Symposium.

[20]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[21]  Bowen Alpern,et al.  Dynamic Type Checking in Jalapeño , 2001, Java Virtual Machine Research and Technology Symposium.

[22]  Laurie J. Hendren,et al.  Efficient Inference of Static Types for Java Bytecode , 2000, SAS.

[23]  Alfred V. Aho,et al.  Principles of Compiler Design , 1977 .

[24]  Gregory J. Chaitin,et al.  Register allocation and spilling via graph coloring , 2004, SIGP.

[25]  Toshiaki Yasue,et al.  Design, implementation, and evaluation of optimizations in a JavaTM Just-In-Time compiler , 2000 .

[26]  Brian T. Lewis,et al.  Open runtime platform: flexibility with performance using interfaces , 2002, JGI '02.

[27]  Jens Palsberg,et al.  Object-oriented type inference , 1991, OOPSLA 1991.

[28]  Vivek Sarkar,et al.  Linear scan register allocation , 1999, TOPL.

[29]  Elliot K. Kolodner,et al.  A parallel, incremental and concurrent GC for servers , 2002, PLDI '02.

[30]  Matthew Arnold,et al.  Thin Guards: A Simple and Effective Technique for Reducing the Penalty of Dynamic Class Loading , 2002, ECOOP.

[31]  Toshio Nakatani,et al.  Effective null pointer check elimination utilizing hardware trap , 2000, ASPLOS 2000.

[32]  Ali-Reza Adl-Tabatabai,et al.  Fast, effective code generation in a just-in-time Java compiler , 1998, PLDI.

[33]  Bowen Alpern,et al.  Implementing jalapeño in Java , 1999, OOPSLA '99.

[34]  Jong-Deok Choi,et al.  Efficient and precise modeling of exceptions for the analysis of Java programs , 1999, PASTE '99.

[35]  Craig Chambers,et al.  Making pure object-oriented languages practical , 1991, OOPSLA 1991.

[36]  James M. Stichnoth,et al.  Practicing JUDO: Java under dynamic optimizations , 2000, PLDI '00.

[37]  Toshio Nakatani,et al.  Effective sign extension elimination , 2002, PLDI '02.

[38]  SteffenBernhard,et al.  Optimal code motion , 1994 .

[39]  Toshiaki Yasue,et al.  A study of devirtualization techniques for a Java Just-In-Time compiler , 2000, OOPSLA '00.

[40]  Alfred V. Aho,et al.  Optimal Code Generation for Expression Trees , 1976, J. ACM.

[41]  Toshiaki Yasue,et al.  A dynamic optimization framework for a Java just-in-time compiler , 2001, OOPSLA '01.