Abstract
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.
This work was supported, in part, by NSERC and FQRNT.
Chapter PDF
References
SPEC JVM98 benchmarks, http://www.spec.org/osg/jvm98/
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)
Alpern, B., Wegman, M.N., Zadeck, F.K.: Detecting equality of variables in programs. In: Proceedings of POPL 1988, pp. 1–11 (1988)
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)
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)
Clausen, L.R.: A Java bytecode optimizer using side-effect analysis. Concurrency: Practice and Experience 9(11), 1031–1045 (1997)
Click, C.: Global code motion/global value numbering. In: Proceedings of PLDI 1995, pp. 246–257 (1995)
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)
Diwan, A., McKinley, K.S., Moss, J.E.B.: Type-based alias analysis. In: Proceedings of PLDI 1998, pp. 106–117 (1998)
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)
Ghiya, R., Hendren, L.J.: Putting pointer analysis to work. In: Proceedings of POPL 1998, pp. 121–133 (1998)
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)
Hind, M., Pioli, A.: Which pointer analysis should I use? In: Proceedings of ISSTA 2000, pp. 113–123 (2000)
Landi, W., Ryder, B.G., Zhang, S.: Interprocedural modification side effect analysis with pointer aliasing. In: Proceedings of PLDI 1993, pp. 56–67 (1993)
Lhoták, O.: Spark: A flexible points-to analysis framework for Java. Master’s thesis, McGill University (December 2002)
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)
Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)
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)
Olivar, G.: Fast points-to and side-effect analysis for the McCAT C compiler. M.Sc. project, McGill University (April 1997), http://citeseer.ist.psu.edu/350797.html
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)
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)
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)
Qian, F., Hendren, L.J.: Towards dynamic interprocedural analysis in jvms. In: Virtual Machine Research and Technology Symposium, pp. 139–150 (2004)
Razafimahefa, C.: A study of side-effect analyses for Java. Master’s thesis, McGill University (December 1999)
Rountev, A., Milanova, A., Ryder, B.G.: Points-to analysis for Java using annotated constraints. In: Proceedings of OOPSLA 2001, pp. 43–55 (2001)
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)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Le, A., Lhoták, O., Hendren, L. (2005). Using Inter-Procedural Side-Effect Information in JIT Optimizations. In: Bodik, R. (eds) Compiler Construction. CC 2005. Lecture Notes in Computer Science, vol 3443. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11406921_22
Download citation
DOI: https://doi.org/10.1007/11406921_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-25411-9
Online ISBN: 978-3-540-31985-6
eBook Packages: Computer ScienceComputer Science (R0)