delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/11/00:47:21

Date: Tue, 10 Feb 1998 21:33:17 -0800 (PST)
Message-Id: <199802110533.VAA05959@adit.ap.net>
Mime-Version: 1.0
To: andrewc AT rosemail DOT rose DOT hp DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: src/gcc.opt in alpha 980101
Cc: djgpp-workers AT delorie DOT com

At 10:30  2/10/1998 PST, Andrew Crabtree wrote:
>
>> >> Why do the switches used to compile the library still include 
>> >> -fno-strength-reduce?  Doesn't this belong to pre-2.7.2.1 gcc and is 
>> >> solved in later versions?
>Hmm - I thought that 2.7.2.1 jsut disabled it by default but that the 
>bug still existed.
AFAIK, 2.7.2.1 does actually fix it. `-fstrength-reduce' is definitely
enabled for 2.7.2.1. I looked at the diff from 2.7.2. It includes a
changelog entry that seems to describe a fix for the bug, and a
corresponding patch that seems to be the fix itself. Actually, it seems like
it just disabled the specific optimization that didn't work (it could be
affected by overflow sometimes, apparently), but left the rest of strength
reduction intact. All this is sort of guesswork though, I don't really grok
the GCC source.
>   It was supposed to be rather rare to come across 
>it though.
Agreed.
>> and see section 4.22. Basically, the theory is that strength reduction tends
>> to replace multiplication with shifts and adds, costing more registers which
>> the x86 can ill afford.
>This depends on the cost table used.  If you use gcc 2.7.2.x which 
>only knows about 386/486 then it will probably not make the best 
>decisions here.  Gcc 2.8, and of course pgcc are much better at strengh
>reduction determination.
Okay, I'll take your word for it. :) I'm not even clear what "strength
reduction" *means*.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019