Using Inter-Procedural Side-Effect Information in JIT Optimizations

Inter-procedural analyses such as side-effect analysis can provide information useful for performing aggressive optimizations. We present a study of whether side-effect information improves performance in just-in-time (JIT) compilers, and if so, what level of analysis precision is needed. We used Spark, the inter-procedural analysis component of the Soot Java analysis and optimization framework, to compute side-effect information and encode it in class files. We modified Jikes RVM, a research JIT, to make use of side-effect analysis in local common sub-expression elimination, heap SSA, redundant load elimination and loop-invariant code motion. On the SpecJVM98 benchmarks, we measured the static number of memory operations removed, the dynamic counts of memory reads eliminated, and the execution time. Our results show that the use of side-effect analysis increases the number of static opportunities for load elimination by up to 98%, and reduces dynamic field read instructions by up to 27%. Side-effect information enabled speedups in the range of 1.08x to 1.20x for some benchmarks. Finally, among the different levels of precision of side-effect information, a simple side-effect analysis is usually sufficient to obtain most of these speedups.

[1]  Laurie J. Hendren,et al.  Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? , 2000, CC.

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

[3]  Paul Feautrier,et al.  Direct parallelization of call statements , 1986, SIGPLAN '86.

[4]  John Phineas Banning A method for determining the side effects of procedure calls , 1978 .

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

[6]  Frances E. Allen,et al.  Interprocedural Data Flow Analysis , 1974, IFIP Congress.

[7]  Barbara G. Ryder,et al.  A schema for interprocedural modification side-effect analysis with pointer aliasing , 2001, TOPL.

[8]  Barbara G. Ryder,et al.  Points-to and Side-Effect Analyses for Programs Built with Precompiled Libraries , 2001, CC.

[9]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

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

[11]  Barbara G. Ryder,et al.  Interprocedural modification side effect analysis with pointer aliasing , 1993, PLDI '93.

[12]  Cliff Click,et al.  Global code motion/global value numbering , 1995, PLDI '95.

[13]  Jeffrey M. Barth A practical interprocedural data flow analysis algorithm , 1978, CACM.

[14]  Barbara G. Ryder,et al.  Comparing flow and context sensitivity on the modification-side-effects problem , 1998, ISSTA '98.

[15]  Michael Hind,et al.  Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses , 1998, SAS.

[16]  M. F.,et al.  Bibliography , 1985, Experimental Gerontology.

[17]  Eugene W. Myers,et al.  A precise inter-procedural data flow algorithm , 1981, POPL '81.

[18]  Stephen J. Fink,et al.  The Jalapeño virtual machine , 2000, IBM Syst. J..

[19]  Laurie J. Hendren,et al.  Putting pointer analysis to work , 1998, POPL '98.

[20]  Ron Cytron,et al.  Interprocedural dependence analysis and parallelization , 1986, SIGP.

[21]  Laurie J. Hendren,et al.  A Study of Type Analysis for Speculative Method Inlining in a JIT Environment , 2005, CC.

[22]  Guang R. Gao,et al.  Designing the McCAT Compiler Based on a Family of Structured Intermediate Representations , 1992, LCPC.

[23]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[24]  Barbara G. Ryder,et al.  Parameterized object sensitivity for points-to and side-effect analyses for Java , 2002, ISSTA '02.

[25]  Amer Diwan,et al.  Type-based alias analysis , 1998, PLDI.

[26]  David C. Sehr,et al.  On the importance of points-to analysis and other memory disambiguation methods for C programs , 2001, PLDI '01.

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

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

[29]  Michael G. Burke An interval-based approach to exhaustive and incremental interprocedural data-flow analysis , 1990, TOPL.

[30]  Vivek Sarkar,et al.  Immutability specification and its applications , 2002, JGI '02.

[31]  John Banning,et al.  : An Efficient , 2022 .

[32]  Jeffrey Michael Barth A practical interprocedural data flow analysis algorithm and its applications. , 1977 .

[33]  Ken Kennedy,et al.  Interprocedural side-effect analysis in linear time , 1988, PLDI '88.

[34]  Thomas C. Spillman,et al.  Exposing Side-Effects in a PL/I Optimizing Compiler , 1971, IFIP Congress.

[35]  Susan Horwitz,et al.  The Effects of the Precision of Pointer Analysis , 1997, SAS.

[36]  John Cocke,et al.  A program data flow analysis procedure , 1976, CACM.

[37]  Eugene W. Myers A Precise and Efficient Algorithm for Determining Existential Summary Data Flow Information , 1980 .

[38]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[39]  Jakob Rehof,et al.  Estimating the Impact of Scalable Pointer Analysis on Optimization , 2001, SAS.

[40]  O. Lhoták Spark: A flexible points-to analysis framework for Java , 2002 .

[41]  Barry K. Rosen Data Flow Analysis for Procedural Languages , 1979, JACM.

[42]  Jong-Deok Choi,et al.  Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects , 1993, POPL '93.

[43]  Michael Hind,et al.  Which pointer analysis should I use? , 2000, ISSTA '00.

[44]  Ondrej Lhoták,et al.  Program analysis using binary decision diagrams , 2006 .

[45]  Laurie J. Hendren,et al.  Towards Dynamic Interprocedural Analysis in JVMs , 2004, Virtual Machine Research and Technology Symposium.

[46]  Kathryn S. McKinley,et al.  The Limits of Alias Analysis for Scalar Optimizations , 2004, CC.

[47]  Chrislain Razafimahefa A Study Of Side-Effect Analyses For Java , 1999 .

[48]  David B. Lomet Data Flow Analysis in the Presence of Procedure Calls , 1977, IBM J. Res. Dev..

[49]  Barbara G. Ryder,et al.  An incremental algorithm for software analysis , 1987, SDE 2.

[50]  Erik Ruf,et al.  Context-insensitive alias analysis reconsidered , 1995, PLDI '95.

[51]  Barbara G. Ryder,et al.  Points-to analysis for Java using annotated constraints , 2001, OOPSLA '01.

[52]  Ondrej Lhoták,et al.  Scaling Java Points-to Analysis Using SPARK , 2003, CC.

[53]  Ken Kennedy,et al.  Efficient computation of flow insensitive interprocedural summary information , 1984, SIGPLAN '84.

[54]  Lars Clausen A Java bytecode optimizer using side‐effect analysis , 1997 .

[55]  Wen-mei W. Hwu,et al.  Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation , 2000, PLDI '00.

[56]  Amer Diwan,et al.  Using types to analyze and optimize object-oriented programs , 2001, TOPL.

[57]  Saumya K. Debray,et al.  Alias analysis of executable code , 1998, POPL '98.

[58]  Laurie J. Hendren,et al.  A framework for optimizing Java using attributes , 2000, CASCON.

[59]  David A. Patterson,et al.  Computer Architecture: A Quantitative Approach , 1969 .