Re: Strength Reduction

preston@dawn.rice.edu (Preston Briggs)
Tue, 17 Sep 1991 18:11:53 GMT

          From comp.compilers

Related articles
Strength Reduction napi@rangkom.MY (1991-09-17)
Re:strength reduction ssimmons@convex.com (1991-09-17)
Re: Strength Reduction preston@dawn.rice.edu (1991-09-17)
Re: strength reduction albaugh@dms.UUCP (1991-09-23)
Re: strength reduction preston@dawn.rice.edu (1991-09-25)
| List of all articles for this month |
Newsgroups: comp.compilers
From: preston@dawn.rice.edu (Preston Briggs)
Keywords: optimize, bibliography
Organization: Rice University, Houston
References: 91-09-040
Date: Tue, 17 Sep 1991 18:11:53 GMT

napi@rangkom.MY (Mohd Hanafiah Abdullah) writes:


>In Induction Variable optimization, beside reducing strength of
>multiplication by using addition in array references, what other strength
>reductions could be performed, like involving division, etc?


Multiplication of an induction variable (IV) by a region constant (RC).


Multiplication of 2 IVs.


Squaring an IV.


Integer division (IV / RC)


Integer module (IV % RC)


Exponentiation (RC ** IV)


General polynomials in an IV may always be reduced to additions.


Many trig functions.


Further, addition may sometimes be usefully reduced.


See
Reduction of Operator Strength
Fran Allen, John Cocke, Ken Kennedy
in Program Flow Analysis
Muchnick and Jones (editors)
Prentice-Hall, 1981


Generally though, you need to handle multiplication.
The other things are fun to watch, but not very useful.


Preston Briggs
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.