A portable approach to dynamic optimization in run-time specialization

This paper proposes arun-time bytecode specialization (BCS) technique that analyzes programs and generates specialized programs at run-time in an intermediate language. By using an intermediate language for code generation, a back-end system canoptimize the specialized programs after specialization. The system uses Java virtual machine language (JVML) as the intermediate language, which allows the system to easily achieve practicalportability and to use existing sophisticated just-in-time (JIT) compilers as its back-end. The binding-time analysis algorithm is based on a type system, and covers a non-object-oriented subset of JVML. The specializer generates programs on a per-instruction basis, and can performmethod inlining at run-time. Our performance measurements show that a non-trivial application program specialized at run-time by BCS runs approximately 3–4 times faster than the unspecialized one. Despite the large overhead of JIT compilation of specialized code, we observed that the overall performance of the application can be improved.

[1]  Peter Lee,et al.  Optimizing ML with run-time code generation , 1996, PLDI '96.

[2]  Nobuhisa Fujinami,et al.  Determination of Dynamic Method Dispatches Using Run-Time Code Generation , 1998, Types in Compilation.

[3]  Dawson R. Engler,et al.  VCODE: a retargetable, extensible, very fast dynamic code generation system , 1996, PLDI '96.

[4]  Satoshi Matsuoka,et al.  OpenJIT: An Open-Ended, Reflective JIT Compiler Framework for Java , 2000, ECOOP.

[5]  Kenichi Asai Binding-time analysis for both static and dynamic expressions , 2009, New Generation Computing.

[6]  Markus Mock,et al.  A retrospective on: "an evaluation of staged run-time optimizations in DyC" , 2004, SIGP.

[7]  Akinori Yonezawa,et al.  Run-Time Bytecode Specialization , 2001, PADO.

[8]  Hidehiko Masuhara,et al.  Run-time bytecode specialization: A portable approach to generating optimized specialized code , 2001 .

[9]  Ulrik Pagh Schultz,et al.  Partial Evaluation for Class-Based Object-Oriented Languages , 2000, PADO.

[10]  Julia L. Lawall,et al.  Automatic, template-based run-time specialization: implementation and experimental study , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[11]  Charles Consel,et al.  A general approach for run-time specialization and its application to C , 1996, POPL '96.

[12]  Martín Abadi,et al.  A type system for Java bytecode subroutines , 1999, TOPL.

[13]  Ulrik Pagh Schultz,et al.  Towards Automatic Specialization of Java Programs , 1999, ECOOP.

[14]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[15]  Jacques Noyé,et al.  Accurate binding-time analysis for imperative languages: flow, context, and return sensitivity , 1997 .

[16]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[17]  Nick Benton,et al.  Compiling standard ML to Java bytecodes , 1998, ICFP '98.

[18]  Jacques Noyé,et al.  Accurate binding-time analysis for imperative languages: flow, context, and return sensitivity , 2000, Theor. Comput. Sci..

[19]  Yoshihiko Futamura,et al.  Partial Evaluation of Computation Process--An Approach to a Compiler-Compiler , 1999, High. Order Symb. Comput..

[20]  Akinori Yonezawa,et al.  Design and Partial Evaluation of Meta-Objects for a Concurrent Reflective Language , 1998, ECOOP.

[21]  Kenichi Asai Binding-Time Analysis for Both Static and Dynamic Expressions , 1999, SAS.

[22]  Calton Pu,et al.  Optimistic incremental specialization: streamlining a commercial operating system , 1995, SOSP.

[23]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[24]  Peter Lee,et al.  Run-time code generation and modal-ML , 1998, PLDI.

[25]  Peter Bertelsen Binding-time analysis for a JVM core language , 1999 .

[26]  Brian N. Bershad,et al.  Fast, effective dynamic compilation , 1996, PLDI '96.

[27]  Andrew A. Berlin,et al.  Partial Evaluation for Scientific Computing: The Supercomputer Toolkit Experience , 1994, PEPM.

[28]  Trevor Jim,et al.  Certifying Compilation and Run-Time Code Generation , 1999, High. Order Symb. Comput..

[29]  Crispin Cowan,et al.  Declarative specialization of object-oriented programs , 1997, OOPSLA '97.

[30]  Erik Ruf,et al.  Specializing shaders , 1995, SIGGRAPH.

[31]  Per Bothner Kawa - Compiling Dynamic Languages to Java VM , 1998, USENIX Annual Technical Conference.

[32]  Fritz Henglein,et al.  Efficient Type Inference for Higher-Order Binding-Time Analysis , 1991, FPCA.

[33]  Ulrik Pagh Schultz,et al.  Object-Oriented Software Engineering Using Partial Evaluaion , 2000 .

[34]  Dawson R. Engler,et al.  C and tcc: a language and compiler for dynamic code generation , 1999, TOPL.