Partial redundancy elimination for access expressions by speculative code motion

We present a new memory access optimization for Java to perform aggressive code motion for speculatively optimizing memory accesses by applying partial redundancy elimination (PRE) techniques. First, to reduce as many barriers as possible and to enhance code motion, we perform alias analysis to identify all the regions in which each object reference is not aliased. Secondly, we find all the possible barriers. Finally, we perform code motions in three steps. For the first step, we apply a non‐speculative PRE algorithm to move load instructions and their following instructions in the backwards direction of the control flow graph. For the second step, we apply a speculative PRE algorithm to move some of them aggressively before the conditional branches. For the third step, we apply our modified version of a non‐speculative PRE algorithm to move store instructions in the forward direction of the control flow graph and to even move some of them after the merge points. We implemented our new algorithm in our production‐level Java just‐in‐time compiler. Our experimental results show that our speculative algorithm improves the average (maximum) performance by 13.1% (90.7%) for jBYTEmark and 1.4% (4.4%) for SPECjvm98 over the fastest algorithm previously described, while it increases the average (maximum) compilation time by 0.9% (2.9%) for both benchmark suites. Copyright © 2004 John Wiley & Sons, Ltd.

[1]  Amer Diwan,et al.  Partial redundancy elimination for access path expressions , 1999, Softw. Pract. Exp..

[2]  Raymond Lo,et al.  Register promotion by sparse partial redundancy elimination of loads and stores , 1998, PLDI.

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

[4]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[5]  Rumi Zahir,et al.  OS and Compiler Considerations in the Design of the IA-64 Architecture , 2000, ASPLOS.

[6]  Bernhard Steffen,et al.  Optimal code motion: theory and practice , 1994, TOPL.

[7]  Rajiv Gupta,et al.  Load-reuse analysis: design and evaluation , 1999, PLDI '99.

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

[9]  Rajiv Gupta,et al.  Array Data Flow Analysis for Load-Store Optimizations in Superscalar Architectures , 1995, LCPC.

[10]  Vivek Sarkar,et al.  Unified Analysis of Array and Object References in Strongly Typed Languages , 2000, SAS.

[11]  Keith D. Cooper,et al.  Register promotion in C programs , 1997, PLDI '97.

[12]  Vivek Sarkar,et al.  ABCD: eliminating array bounds checks on demand , 2000, PLDI '00.

[13]  Michael A. Harrison,et al.  Accurate static estimators for program optimization , 1994, PLDI '94.

[14]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[15]  Toshiaki Yasue,et al.  Design, implementation, and evaluation of optimizations in a just-in-time compiler , 1999, JAVA '99.

[16]  William Pugh Fixing the Java memory model , 1999, JAVA '99.

[17]  Rajiv Gupta,et al.  Complete removal of redundant expressions , 1998, PLDI 1998.

[18]  Jong-Deok Choi,et al.  Optimizing Java Programs in the Presence of Exceptions , 2000, ECOOP.

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

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

[21]  Keith H. Randall,et al.  Field analysis: getting useful and low-cost interprocedural information , 2000, PLDI '00.

[22]  Urs Hölzle,et al.  Eliminating Virtual Function Calls in C++ Programs , 1996, ECOOP.

[23]  Rajiv Gupta,et al.  Path profile guided partial redundancy elimination using speculation , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[24]  Ken Kennedy,et al.  Scalar replacement in the presence of conditional control flow , 1994, Softw. Pract. Exp..

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

[26]  Toshio Nakatani,et al.  Bytecode fetch optimization for a Java interpreter , 2002, ASPLOS X.

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

[28]  R. N. Horspool,et al.  Partial redundancy elimination driven by a cost-benefit analysis , 1997, Proceedings of the Eighth Israeli Conference on Computer Systems and Software Engineering.