[patch] for PR 18687

Mark Mitchell mark@codesourcery.com
Mon Feb 21 10:57:00 GMT 2005


David Edelsohn wrote:
> 	This patch has a good effect if -funroll-loops also is enabled,
> but a very bad effect without.  For instance, on our tests, swim loses
> nearly 20% performance with the patch when using options
> 
> -O2 -mcpu=power4
> 
> versus
> 
> -O2 -mcpu=power4 -funroll-lops -fpeel-loops

That's disturbing.

Unless we were just getting incredibly lucky before, I'm concerned about 
this issue, as using "-O2 -mcpu=power4" is the optimization setting more 
likely to be used by most people.

Zdenek, from your original posting it sounded like the two improvements 
that you made should not affect the generated code.  You describe (a) 
memoizing the result of a frequently called function, and (b) speeding 
up a check that gates whether or not it is possible to perform the 
optimization.

Did you expect your change to have other side-effects?

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gcc-patches mailing list