Strength reduction of constant multipliers

cliffc@cs.rice.edu (Cliff Click)
Tue, 13 Oct 1992 15:13:58 GMT

          From comp.compilers

Related articles
Strength reduction of constant multipliers cliffc@cs.rice.edu (1992-10-13)
Re: Strength reduction of constant multipliers sastdr@unx.sas.com (1992-10-14)
Re: Strength reduction of constant multipliers sastdr@unx.sas.com (1992-10-15)
Strength reduction of constant multipliers cliffc@cs.rice.edu (1992-10-15)
Re: Strength reduction of constant multipliers davidm@voltaire.rational.com (1992-10-14)
Re: Strength reduction of constant multipliers preston@dawn.cs.rice.edu (1992-10-20)
multiplication by constant - quick comparison of algorithms wu@sequent.com (Youfeng Wu) (1992-10-21)
[1 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: cliffc@cs.rice.edu (Cliff Click)
Organization: Compilers Central
Date: Tue, 13 Oct 1992 15:13:58 GMT
Keywords: arithmetic, optimize, comment

I can send or post C code to do strength reduction of constant
multipliers. It is reasonably fast (linear in the number of bits, i.e.
32) but not optimal. If you are interested, reply to me.


Cliff
[I put in similar strength reduction to the AIX 1.0 C compiler for the ROMP;
basically you scan across the constant multiplier and for every non-zero bit
you add in the multiplicand shifted appropriately. See Knuth, Volume 2,
pages 444-466 for more than you wanted to know on this topic. -John]
--


Post a followup to this message

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