Using Inter-Procedural Side-Effect Information in JIT Optimizations

  • Anatole Le
  • Ondřej Lhoták
  • Laurie Hendren
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3443)


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.


Virtual Machine Call Graph Interprocedural Analysis Allocation Site Common Subexpression Elimination 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    SPEC JVM98 benchmarks,
  2. 2.
    Alpern, B., Attanasio, C.R., Barton, J.J., Burke, M.G., Cheng, P., Choi, J.-D., Cocchi, A., Fink, S.J., Grove, D., Hind, M., Hummel, S.F., Lieber, D., Litvinov, V., Mergen, M.F., Ngo, T., Russell, J.R., Sarkar, V., Serrano, M.J., Shepherd, J.C., Smith, S.E., Sreedhar, V.C., Srinivasan, H., Whaley, J.: The Jalapeño virtual machine. IBM Syst. J. 39(1), 211–238 (2000)CrossRefGoogle Scholar
  3. 3.
    Alpern, B., Wegman, M.N., Zadeck, F.K.: Detecting equality of variables in programs. In: Proceedings of POPL 1988, pp. 1–11 (1988)Google Scholar
  4. 4.
    Choi, J.-D., Burke, M., Carini, P.: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: Proceedings of POPL 1993, pp. 232–245 (1993)Google Scholar
  5. 5.
    Chowdhury, R.A., Djeu, P., Cahoon, B., Burrill, J.H., McKinley, K.S.: The limits of alias analysis for scalar optimizations. In: Duesterwald, E. (ed.) CC 2004. LNCS, vol. 2985, pp. 24–38. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  6. 6.
    Clausen, L.R.: A Java bytecode optimizer using side-effect analysis. Concurrency: Practice and Experience 9(11), 1031–1045 (1997)CrossRefGoogle Scholar
  7. 7.
    Click, C.: Global code motion/global value numbering. In: Proceedings of PLDI 1995, pp. 246–257 (1995)Google Scholar
  8. 8.
    Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995)Google Scholar
  9. 9.
    Diwan, A., McKinley, K.S., Moss, J.E.B.: Type-based alias analysis. In: Proceedings of PLDI 1998, pp. 106–117 (1998)Google Scholar
  10. 10.
    Fink, S.J., Knobe, K., Sarkar, V.: Unified analysis of array and object references in strongly typed languages. In: Static Analysis Symposium, pp. 155–174 (2000)Google Scholar
  11. 11.
    Ghiya, R., Hendren, L.J.: Putting pointer analysis to work. In: Proceedings of POPL 1998, pp. 121–133 (1998)Google Scholar
  12. 12.
    Ghiya, R., Lavery, D., Sehr, D.: On the importance of points-to analysis and other memory disambiguation methods for C programs. In: Proceedings of PLDI 2001, pp. 47–58 (2001)Google Scholar
  13. 13.
    Hind, M., Pioli, A.: Which pointer analysis should I use? In: Proceedings of ISSTA 2000, pp. 113–123 (2000)Google Scholar
  14. 14.
    Landi, W., Ryder, B.G., Zhang, S.: Interprocedural modification side effect analysis with pointer aliasing. In: Proceedings of PLDI 1993, pp. 56–67 (1993)Google Scholar
  15. 15.
    Lhoták, O.: Spark: A flexible points-to analysis framework for Java. Master’s thesis, McGill University (December 2002)Google Scholar
  16. 16.
    Lhoták, O., Hendren, L.: Scaling Java points-to analysis using Spark. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 153–169. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  17. 17.
    Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)Google Scholar
  18. 18.
    Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to and side-effect analyses for Java. In: Proceedings of ISSTA 2002, pp. 1–11 (2002)Google Scholar
  19. 19.
    Olivar, G.: Fast points-to and side-effect analysis for the McCAT C compiler. M.Sc. project, McGill University (April 1997),
  20. 20.
    Pechtchanski, I., Sarkar, V.: Immutability specification and its applications. In: Proceedings of the 2002 Joint ACM-ISCOPE Conference on Java Grande, pp. 202–211 (2002)Google Scholar
  21. 21.
    Pominville, P., Qian, F., Vallée-Rai, R., Hendren, L., Verbrugge, C.: A framework for optimizing Java using attributes. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 334–354. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  22. 22.
    Qian, F., Hendren, L.: A study of type analysis for speculative method inlining in a JIT environment. In: Bodik, R. (ed.) CC 2005. LNCS, vol. 3443, pp. 255–270. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  23. 23.
    Qian, F., Hendren, L.J.: Towards dynamic interprocedural analysis in jvms. In: Virtual Machine Research and Technology Symposium, pp. 139–150 (2004)Google Scholar
  24. 24.
    Razafimahefa, C.: A study of side-effect analyses for Java. Master’s thesis, McGill University (December 1999)Google Scholar
  25. 25.
    Rountev, A., Milanova, A., Ryder, B.G.: Points-to analysis for Java using annotated constraints. In: Proceedings of OOPSLA 2001, pp. 43–55 (2001)Google Scholar
  26. 26.
    Rountev, A., Ryder, B.G.: Points-to and side-effect analyses for programs built with precompiled libraries. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 20–36. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  27. 27.
    Ryder, B.G., Landi, W.A., Stocks, P.A., Zhang, S., Altucher, R.: A schema for interprocedural modification side-effect analysis with pointer aliasing. ACM Transactions on Programming Languages and Systems 23(2), 105–186 (2001)CrossRefGoogle Scholar
  28. 28.
    Stocks, P.A., Ryder, B.G., Landi, W.A., Zhang, S.: Comparing flow and context sensitivity on the modification-side-effects problem. In: Proceedings of ISSTA 1998, pp. 21–31 (1998)Google Scholar
  29. 29.
    Vallée-Rai, R., Gagnon, E., Hendren, L.J., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java bytecode using the Soot framework: is it feasible? In: Watt, D.A. (ed.) CC 2000. LNCS, vol. 1781, pp. 18–34. Springer, Heidelberg (2000)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Anatole Le
    • 1
  • Ondřej Lhoták
    • 1
  • Laurie Hendren
    • 1
  1. 1.Sable Research GroupMcGill UniversityMontrealCanada

Personalised recommendations