Abstract
We develop an expansion-based algorithm for semantic partial redundancy elimination (SPRE), which overcomes the central drawbacks of the state-of-the-art approaches, which leave the program structure invariant: they fail to eliminate all partial redundancies even for acyclic programs. Besides being optimal for acyclic programs, our algorithm is unique in eliminating all partial k-redundancies, a new class of redundancies which is characterised by the number k of loop iterations across which values have to be kept. These optimality results come at the price of an in the worst case exponential program growth. The new technique is thus tailored for optimizing the typically considerably small computational “hot” spots of a program. Here it is particularly promising because its structural simplicity supports extensions to uniformly capture further powerful optimisations like constant propagation or strength reduction in a mutually supportive way.
Chapter PDF
Similar content being viewed by others
Keywords
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.
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading (1985)
Allen, F.E., Cocke, J., Kennedy, K.: Reduction of operator strength. In: Muchnick, S.S., Jones, N.D. (eds.) Program Flow Analysis: Theory and Applications, ch. 3, pp. 79–101. Prentice Hall, Englewood Cliffs (1981)
Bodík, R., Anik, S.: Path-sensitive value-flow analysis. In: Conf. Rec. 25th Symp. on Principles of Programming Languages POPL 1998, pp. 237–251. ACM, New York (1998)
Bodík, R., Gupta, R., Soffa, M.-L.: Complete removal of redundant expressions. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl. PLDI 1998. ACM SIGPLAN Not., vol. 33, pp. 1–14 (1998)
Click, C.: Global code motion/global value numbering. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl. PLDI 1995. ACM SIGPLAN Not., vol. 30(6), pp. 246–257 (1995)
Cocke, J., Kennedy, K.: An algorithm for reduction of operator strength. Comm. ACM 20(11), 850–856 (1977)
Cocke, J., Schwartz, J.T.: Programming languages and their compilers. In: Courant Inst. Math. Sciences, NY (1970)
Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Prog. Lang. Syst. 13(4), 451–490 (1991)
Kam, J.B., Ullman, J.D.: Monotone data flow analysis frameworks. Acta Informatica 7, 305–317 (1977)
Kildall, G.A.: A unified approach to global program optimization. In: Conf. Rec. 1st Symp. Principles of Prog. Lang. POPL 1973, pp. 194–206. ACM, New York (1973)
Knoop, J., Rüthing, O., Steffen, B.: The power of assignment motion. In: Proc. ACM SIGPLAN Conf. on Prog. Lang. Design and Impl. PLDI 1995. ACM SIGPLAN Not., vol. 30(6), pp. 233–245 (1995)
Knoop, J., Rüthing, O., Steffen, B.: Code motion and code placement: Just synomyms? In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 154–169. Springer, Heidelberg (1998)
Morel, E., Renvoise, C.: Global optimization by suppression of partial redundancies. Comm. ACM 22(2), 96–103 (1979)
Reif, J.H., Lewis, R.: Symbolic evaluation and the global value graph. In: Conf. Rec. 4th Symp. Principles of Prog. Lang. POPL 1977, pp. 104–118. ACM, New York (1977)
Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Global value numbers and redundant computations. In: Conf. Rec. 15th Symp. Principles of Prog. Lang. POPL 1988, pp. 2–27. ACM, New York (1988)
Steffen, B.: Optimal run time optimization - Proved by a new look at abstract interpretations. In: Ehrig, H., Levi, G., Montanari, U. (eds.) CAAP 1987 and TAPSOFT 1987. LNCS, vol. 249, pp. 52–68. Springer, Heidelberg (1987)
Steffen, B.: Property-oriented expansion. In: Cousot, R., Schmidt, D.A. (eds.) SAS 1996. LNCS, vol. 1145. Springer, Heidelberg (1996)
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. Springer, Heidelberg (1990)
Steffen, B., Knoop, J., Rüthing, O.: Efficient code motion and an adaption to strength reduction. In: Abramsky, S. (ed.) TAPSOFT 1991, CCPSD 1991, and ADC-Talks 1991. LNCS, vol. 494. Springer, Heidelberg (1991)
Whitfield, D., Soffa, M.L.: An approach to ordering optimizing transformations. In: Proc. 2nd ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming PPOPP 1990. ACM SIGPLAN Not., vol. 25(3), pp. 137–147 (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Knoop, J., Rüthing, O., Steffen, B. (1999). Expansion-Based Removal of Semantic Partial Redundancies. In: Jähnichen, S. (eds) Compiler Construction. CC 1999. Lecture Notes in Computer Science, vol 1575. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-49051-7_7
Download citation
DOI: https://doi.org/10.1007/978-3-540-49051-7_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65717-0
Online ISBN: 978-3-540-49051-7
eBook Packages: Springer Book Archive