Abstract
Partial redundancy elimination can reduce the number of loads corresponding to field and array accesses in Java programs. The reuse of values loaded from memory at subsequent occurrences of load expressions must be done with care: Precise exceptions and the potential of side effects through method invocations and concurrent modifications in multi-threaded programs must be considered.
This work focuses on the effect of concurrency on the load optimization. Unlike previous approaches, our system determines accurate information about side effects and concurrency through a whole-program analysis. Partial redundancy elimination is extended to exploit this information and to broaden the optimization scope.
There are three main results: (1) Load elimination is effective even in the most conservative variant without side effect and concurrency analysis (avg. dynamic reduction of loads 23.4%, max. 55.6%). (2) Accurate side effect information can significantly increase the number of optimized expressions (avg. dynamic reduction of loads 28.6%, max. 66.1%). (3) Information about concurrency can make the optimization independent of the memory model, enables aggressive optimization across synchronization statements, and can improve the number of optimization opportunities compared to an uninformed optimizer that is guided by a (weak) memory model (avg. dynamic reduction of loads 28.5%, max. 70.3%).
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Bodik, R., Gupta, R., Soffa, M.: Load-reuse analysis: Design and evaluation. In: Proc. PLDI 1999, pp. 64–76 (1999)
Chow, F., Chan, S., Kennedy, R., Liu, S., Lo, R., Tu, P.: Partial redundancy elimination in SSA form. ACM TOPLAS 21(3), 627–676 (1999)
Clausen, L.R.: A Java bytecode optimizer using side-effect analysis. In: ACM Workshop on Java for Science and Engineering Computation (June 1997)
GNU Software. gcj - The GNU compiler for the Java programming language (2000), http://gcc.gnu.org/java
Gupta, M., Choi, J., Hind, M.: Optimizing Java programs in the presence of exceptions. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, pp. 422–446. Springer, Heidelberg (2000)
Hosking, A., Nystrom, N., Whitlock, D., Cutts, Q., Diwan, A.: Partial redundancy elimination for access path expressions. Software Practice and Experience 31(6), 577–600 (2001)
Java Grande Forum. Multi-threaded benchmark suite (1999), http://www.epcc.ed.ac.uk/javagrande/
Landi, W., Ryder, B.G., Zhang, S.: Interprocedural modification side effect analysis with pointer aliasing. ACM SIGPLAN Notices 28(6), 56–67 (1993)
Lee, J., Padua, D., Midkiff, S.: Basic compiler algorithms for parallel programs. In: Proc. PPoPP 1999, May 1999, pp. 1–12 (1999)
Lo, R., Chow, F., Kennedy, R., Liu, S., Tu, P.: Register promotion by sparse partial redundancy elimination of loads and stores. In: Proc. PLDI 1998, pp. 26–37 (1998)
Manson, J., Pugh, B.: JSR-133: Java Memory Model and Thread Specification (2003), http://www.cs.umd.edu/~pugh/java/memoryModel
Midkiff, S., Padua, D.: Issues in the optimization of parallel programs. In: Padua, D. (ed.) Proc. ICPP 1990, August 1990, pp. 105–113 (1990)
Ruf, E.: Effective synchronization removal for Java. In: Proc. PLDI 2000, June 2000, pp. 208–218 (2000)
Sundaresan, V., Hendren, L., Razafimahefa, C., Vallée-Rai, R., Lam, P., Gagnon, E., Godin, C.: Practical virtual method call resolution for Java. In: OOPSLA 2000, October 2000, pp. 264–280 (2000)
The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks (1996), http://www.spec.org/osg/jvm98
von Praun, C., Gross, T.: Static conflict analysis for multi-threaded object-oriented programs. In: Proc. PLDI 2003, June 2003, pp. 115–128 (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
von Praun, C., Schneider, F., Gross, T.R. (2004). Load Elimination in the Presence of Side Effects, Concurrency and Precise Exceptions. In: Rauchwerger, L. (eds) Languages and Compilers for Parallel Computing. LCPC 2003. Lecture Notes in Computer Science, vol 2958. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24644-2_25
Download citation
DOI: https://doi.org/10.1007/978-3-540-24644-2_25
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21199-0
Online ISBN: 978-3-540-24644-2
eBook Packages: Springer Book Archive