Abstract
In the presence of information regarding the execution frequencies of various control paths in a program, use of the tradeoff between code space and execution efficiency has been shown to aid in “selective replication” and optimal placement of code over a program region. This paper extends the scope of the code replication and placement strategies to optimization by reduction of operator strength. The resulting composite strength reduction-cum-code placement approach is shown to eliminate the latent suboptimalities of conventional strength reduction. The approach subsumes the conventional transformations of (1) common subexpression elimination, and (2) movement of loop invariant code, and is easily amenable to the use of efficient solution procedures.
Similar content being viewed by others
References
A. V. Aho and J. D. Ullman,Principles of Compiler Design (Addison-Wesley, Reading, Massachusetts, 1977).
F. E. Allen, “Control flow analysis,”SIGPLAN Notices 9:1–19 (1970).
J. Cocke and K. Kennedy, “Profitability computations on program flow graphs,”Computers and Mathematics with Applications 24:145–159 (1976).
J. Cocke and K. Kennedy, “An algorithm for reduction of operator strength,”Commn. ACM 20:850–856 (1977).
D. M. Dhamdhere, “Algorithm for operator strength reduction,”Comm. ACM 22:311–312 (1979).
D. M. Dhamdhere and J. R. Isaac, “Profitability of Code Movement Optimization,” Computer Centre report, Indian Institute of Technology, Bombay (1978).
S. L. Graham and M. Wegman, “A fast and usually linear algorithm for global flow analysis,”J. ACM 26:172–202 (1976).
D. Gries,Compiler Construction for Digital Computers (Wiley, New York, 1971).
D. Ingalls, “The execution time profile as a programming tool,” inDesign and Optimization of Compilers, R. Rustin, Ed. (Prentice-Hall, Englewood Cliffs, New Jersey, 1972).
K. Kennedy, “A global flow analysis algorithm,”Internat. J. Computer Mathematics 6:5–15 (1971).
K. Kennedy, “Safety of code movement,”Internat. J. Computer Mathematics 6: 112–130 (1972).
E. Morel and C. Renvoise “Global optimization by suppression of partial redundancies,”Commn. ACM 22:96–103 (1979).
M. Schaefer,A Mathematical Theory of Global Program Optimization (Prentice-Hall, Englewood Cliffs, New Jersey, 1973).
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Dhamdhere, D.M., Isaac, J.R. A composite algorithm for strength reduction and code movement optimization. International Journal of Computer and Information Sciences 9, 243–273 (1980). https://doi.org/10.1007/BF00977786
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF00977786