This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] for PR 18687


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]