ACM Home Page
Please provide us with feedback. Feedback
Operator strength reduction
Full text PdfPdf (240 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 23 ,  Issue 5  (September 2001) table of contents
Pages: 603 - 625  
Year of Publication: 2001
ISSN:0164-0925
Authors
Keith D. Cooper  Rice University, Houston, TX
L. Taylor Simpson  BOPS, Incorporated, Austin, TX
Christopher A. Vick  Sun Microsystems, Incorporated, Palo Alto, CA
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): n/a,   Downloads (12 Months): n/a,   Citation Count: 5
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/504709.504710
What is a DOI?

ABSTRACT

Operator strength reduction is a technique that improves compiler-generated code by reformulating certain costly computations in terms of less expensive ones. A common case arises in array addressing expressions used in loops. The compiler can replace the sequence of multiplies generated by a direct translation of the address expression with an equivalent sequence of additions. When combined with linear function test replacement, strength reduction can speed up the execution of loops containing array references. The improvement comes from two sources: a reduction in the number of operations needed to implement the loop and the use of less costly operations.This paper presents a new algorithm for operator strength reduction, called OSR. OSR improves upon an earlier algorithm of Allen, Cocke, and Kennedy [Allen et al. 1981]. OSR operates on the static single assignment (SSA) form of a procedure [Cytron et al. 1991]. By taking advantage of the properties of SSA form, we have derived an algorithm that is simple to understand, quick to implement, and, in practice, fast to run. Its asymptotic complexity is, in the worst case, the same as the Allen, Cocke,and Kennedy algorithm (ACK). OSR achieves optimization results that are equivalent to those obtained with the ACK algorithm. OSR has been implemented in several research and production compilers.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
ALLEN, F. E. 1969. Program optimization. Annual Review in Automatic Programming 5, 239-308.
 
2
ALLEN, F. E., COCKE,J.,AND KENNEDY, K. 1981. Reduction of operator strength. In Program Flow Analysis: Theory and Applications, S. S. Muchnick and N. D. Jones, Eds. Prentice-Hall, Englewood Cliffs, NJ, USA.
3
 
4
5
6
 
7
 
8
9
 
10
BRIGGS,P.AND HARVEY, T. J. 1994. Multiplication by integer constants. This is a "web", a literate programming document. See http://softlib.rice.edu/MSCP.
11
 
12
CHAITIN,G.J.,AUSLANDER, M. A., CHANDRA, A. K., COCKE, J., HOPKINS,M.E.,AND MARKSTEIN,P.W. 1981. Register allocation via coloring. Computer Languages 6, 47-57.
 
13
CHASE, D. R. 1988. Personal communication in the form of an unpublished report.
14
15
16
 
17
COCKE,J.AND MARKSTEIN, P. 1980a. Measurement of program improvement algorithms. In Proceedings of Information Processing 80. North Holland Publishing Company, Tokyo, Japan.
 
18
COCKE,J.AND MARKSTEIN, P. 1980b. Strength reduction for division and modulo with application to a multilevel store. IBM J. Res. Dev. 24, 6, 692-694.
 
19
COCKE,J.AND SCHWARTZ, J. T. 1970. Programming languages and their compilers: Preliminary notes. Tech. rep., Courant Institute of Mathematical Sciences, New York University.
 
20
COOPER,K.D.AND SIMPSON, L. T. 1995. SCC-based value numbering. Tech. Rep. TR95636, Center for Research on Parallel Computation, Rice University. Oct.
21
 
22
DHAMDHERE, D. M. 1979. On algorithms for operator strength reduction. Communications of the ACM 22, 5 (May), 311-312.
 
23
DHAMDHERE, D. M. 1989. A new algorithm for composite hoisting and strength reduction. Int. J. Comput. Math. 27, 1, 1-14.
24
 
25
EARLY, J. 1974. High level iterators and a method of automatically designing data structure representation. Tech. Rep. ERL-M416, Computer Science Division, University of California, Berkeley. Feb.
26
27
 
28
GRANLUND, T. 1995. Private communication with P. Briggs. Discussion of his work in building the routine synth mult for the Gnu C Compiler.
29
 
30
31
 
32
ISSAC,J.AND DHAMDHERE, D. M. 1980. A composite algorithm for strength reduction and code movement. Int. J. Comput. Info. Sci. 9, 3, 243-273.
33
 
34
KENNEDY, K. 1973. Reduction in strength using hashed temporaries. SETL Newsletter 102, Courant Institute of Mathematical Sciences, New York University. Mar.
 
35
KENNEDY, K. 1978. Use-definition chains with applications. Computer Languages 3, 163- 179.
36
 
37
KNOOP, J., RUTHING,O.,AND STEFFEN, B. 1993. Lazy strength reduction. J. Program. Lang. 1,1, 71-91.
38
39
 
40
 
41
MARKSTEIN,P.W.,MARKSTEIN,V.,AND ZADECK, F. K. 1994. Reassociation and strength reduction. Chapter from an unpublished book, Optimization in Compilers.
42
43
44
 
45
SANTHANAM, V. 1992. Register reassociation in PA-RISC compilers. Hewlett-Packard Journal 14,6 (June), 33-38.
 
46
SCARBOROUGH,R.G.AND KOLSKY, H. G. 1980. Improved optimization of FORTRAN object programs. IBM J. Res. Dev. 24, 6 (Nov.), 660-676.
47
 
48
TARJAN, R. E. 1972. Depth first search and linear graph algorithms. SIAM J. Comput. 1, 2 (June), 146-160.
 
49
TARJAN, R. E. 1974. Testing flow graph reducibility. J. Comput. Syst. Sci. 9, 355-365.
 
50
VICK, C. A. 1994. SSA based reduction of operator strength. M.S. dissertation, Rice University, Department of Computer Science.
51
52
53


Collaborative Colleagues:
Keith D. Cooper: colleagues
L. Taylor Simpson: colleagues
Christopher A. Vick: colleagues