Abstract
Partial redundancy elimination (PRE) is a program transformation that identifies and eliminates expressions that are redundant on at least one (but not necessarily all) execution paths. Global value numbering (GVN) is a program analysis and transformation that identifies operations that compute the same value and eliminates operations that are redundant. A weakness of PRE is that it traditionally considers only expressions that are lexically equivalent. A weakness of GVN is that it traditionally considers only operations that are fully redundant. In this paper, we examine the work that has been done on PRE and GVN and present a hybrid algorithm that combines the strengths of each. The contributions of this work are a framework for thinking about expressions and values without source-level lexical constraints, a system of data-flow equations for determining insertion points, and a practical algorithm for extending a simple hash-based GVN for PRE. Our implementation subsumes GVN statically and, on most benchmarks, in terms of performance.
Chapter PDF
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers—principles, techniques, and tools. Addison Wesley, Reading (1986)
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 System Journal 39(1) (February 2000)
Alpern, B., Wegman, M., Zadeck, K.: Detecting equality of variables in programs. In: Proceedings of the Symposium on Principles of Programming Languages, San Diego, California, January 1988, pp. 1–11 (1988)
Bodík, R., Anik, S.: Path-sensitive value-flow analysis. In: Proceedings of the Symposium on Principles of Programming Languages [26], pp. 237–251
Briggs, P., Cooper, K.D.: Effective partial redundancy elimination. In: Proceedings of the Conference on Programming Language Design and Implemenation, Orlando, FL, June 1994, pp. 159–170. SIGPLAN (1994)
Briggs, P., Cooper, K.D., Taylor Simpson, L.: Value numbering. Software—Practice and Experience 27(6), 701–724 (1997)
Burke, M.G., Choi, J.-D., Fink, S., Grove, D., Hind, M., Sarkar, V., Serrano, M., Sreedhar, V., Srinvasan, H., Whaley, J.: The Jalapeño dynamic optimizing compiler for Java. In: ACM 1999 Java Grande Conference, June 1999, pp. 129–141 (1999)
Chow, F., Chan, S., Kennedy, R., Liu, S.-M., Lo, R., Tu, P.: A new algorithm for partial redundancy elimination based on SSA form. In: Proceedings of the Conference on Programming Language Design and Implemenation, Las Vegas, Nevada, June 1997, pp. 273–286 (1997)
Click, C.: Global code motion, global value numbering. In: Proceedings of the Conference on Programming Language Design and Implemenation, La Jolla, CA, June 1995. SIGPLAN Notices, vol. 30(6), pp. 246–257 (1995)
Standard Performance Evalution Counsil. SPEC JVM 98 benchmarks (1998), http://www.spec.org/osg/jvm98/
Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Kenneth Zadeck, F.: Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems 13(4), 451–490 (1991)
Dhamdhere, D.M.: E-path pre—partial redundancy elimination made easy. ACM SIGPLAN Notices 37(8), 53–65 (2002)
Drechsler, K.-H., Stadel, M.P.: A variation of Knoop, Rüthing, and Steffen’s lazy code motion. ACM SIGPLAN Notices 28(5), 29–38 (1993)
EPCC. The java grande forum benchmark suite, http://www.epcc.ed.ac.uk/javagrande/index_1.html
Fink, S., Knobe, K., Sarkar, V.: Unified analysis of array and object references in strongly typed languages. In: Proceedings of the Static Analysis Symposium, Santa Barbara, California, July 2000, pp. 155–174 (2000)
Gargi, K.: A sparse algorithm for predicated global value numbering. In: Proceedings of the Conference on Programming Language Design and Implemenation, Berlin, Germany, June 2002, pp. 45–56 (2002)
Kennedy, R., Chan, S., Liu, S.-M., Lo, R., Tu, P., Chow, F.: Partial redundancy elimination. ACM Transactions on Programming Languages and Systems 21(3), 627–676 (1999)
Knobe, K., Sarkar, V.: Array SSA form and its use in Parallelizaiton. In: Proceedings of the Symposium on Principles of Programming Languages [26], pp. 107–120
Knoop, J., Rüthing, O., Steffen, B.: Lazy code motion. In: Proceedings of the Conference on Programming Language Design and Implemenation, San Francisco, CA, July 1992. SIGPLAN Notices, vol. 27(7), pp. 224–234 (1992)
Knoop, J., Rüthing, O., Steffen, B.: Optimal code motion: Theory and practice. ACM Transactions on Programming Languages and Systems 16(4), 1117–1155 (1994)
Knoop, J., Rüthing, O., Steffen, B.: Code motion and code placement: Just synonyms? In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 154–169. Springer, Heidelberg (1998)
Knoop, J., Rüthing, O., Steffen, B.: Expansion-based removal of semantic partial redundancies. In: Jähnichen, S. (ed.) CC 1999. LNCS, vol. 1575, pp. 91–107. Springer, Heidelberg (1999)
Lee, H., Diwan, A., Eliot, J., Moss, B.: Understanding the behavior of compiler optimizations (submitted)
Morel, E., Renvoise, C.: Global optimization by supression of partial redundancies. Communications of the ACM 22(2), 96–103 (1979)
Muchnick, S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco (1997)
Proceedings of the Symposium on Principles of Programming Languages, San Diego, California (January 1998)
IBM Research. The Jikes Research Virtual Machine, http://www-124.ibm.com/developerworks/oss/jikesrvm/
Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Global value numbers and redundant computations. In: Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 12–27. ACM Press, New York (1988)
Rüthing, O., Steffen, B., Knoop, J.: Detecting equalities of variables—combining efficiency with precision. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 232–247. Springer, Heidelberg (1999)
Simpson, L.T.: Value-driven redundancy elimination. PhD thesis, Rice University (1996)
Steffen, B.: Optimal run-time optimization—proved by a new look at abstract interpretation. In: Ehrig, H., Levi, G., Montanari, U. (eds.) CAAP 1987 and TAPSOFT 1987. LNCS, vol. 249, pp. 52–68. Springer, Heidelberg (1987)
Steffen, B., Knoop, J., Rüthing, O.: The value flow graph—a program representation for optimal program transformations. In: Jones, N.D. (ed.) ESOP 1990. LNCS, vol. 432, pp. 389–405. Springer, Heidelberg (1990)
Steffen, B., Knoop, J., Rüthing, O.: Efficient code motion and an adaptation to strength reduction. In: Abramsky, S. (ed.) TAPSOFT 1991, CCPSD 1991, and ADC-Talks 1991. LNCS, vol. 494. Springer, Heidelberg (1991)
VanDrunen, T., Hosking, A.L.: Anticipation-based partial redundancy elimination for static single assignment form (submitted, 2003)
VanDrunen, T., Hosking, A.L.: Corner cases in value-based partial redundancy elimination. Technical Report CSD-TR#03-032, Purdue University Department of Computer Sciences (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
VanDrunen, T., Hosking, A.L. (2004). Value-Based Partial Redundancy Elimination. In: Duesterwald, E. (eds) Compiler Construction. CC 2004. Lecture Notes in Computer Science, vol 2985. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24723-4_12
Download citation
DOI: https://doi.org/10.1007/978-3-540-24723-4_12
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21297-3
Online ISBN: 978-3-540-24723-4
eBook Packages: Springer Book Archive