Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.arch Subject: Re: Optimization vs. the programmer Message-ID: <919@aw.sei.cmu.edu.sei.cmu.edu> Date: Mon, 13-Apr-87 08:24:20 EST Article-I.D.: aw.919 Posted: Mon Apr 13 08:24:20 1987 Date-Received: Sun, 19-Apr-87 09:41:16 EST References: <479@danews.ATT.COM> <3300003@uiucdcsm> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE) Organization: Carnegie-Mellon University, SEI, Pgh, Pa Lines: 11 In article <3300003@uiucdcsm> grunwald@uiucdcsm.cs.uiuc.edu writes: > >Strength reduction is replacement of operations such as "i = j * 8" by >"i = j << 3", or "i = j % 8" by "i = j & 0x3" (if j is unsigned). Oh. I thought strength reduction was replacing i := j*8 by i := i+8 within a loop whose induction variable was j. So it's explained in Wulf's The Design of an Optimising Compiler, anyway. Also, don't you mean "j&7" in the second replacement? And in the first, the replacement is invalid if the expression overflows.