This is the mail archive of the gcc@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: Should -fcross-jumping be part of -O1?


> I've been testing a somewhat more comprehensive version of my 
> evolutionary algorithm, based on feedback from readers of my article and 
> an extended set of tested options.
> 
> In the first tests run yesterday, -fcrossjumping proved to be 
> pessimistic for some cases. On one benchmark (huffbench), "-O3 
> -fno-crossjumping" is 7% faster than "-O3", all other flags being equal. 
>  The man states that, when using -fcrossjumping, "the resulting code 
> may or may not perform better than without cross-jumping."
> 
> So why is -fcrossjumping included in -O1?
crossjumping has been -O1 thing forever, but I would also agree that it
should be disabled at -O1.  At minimum it may get compile time expensive
in some cases.

Do you have testcases that ere pessimized at -O2?  -fcrossjumping may
introduce new branches that are supposed to be elliminated by basic
block reordering not done at -O1.

Crossjumping is not supposed to get code faster, it is code size
optimization, so the -O3 difference is likely showing that your code is
getting off the caches. Said that, it seems to me that it is good
optimization for -O2 becuase binary size is very important factor.

Honza
> 
> -- 
> Scott Robert Ladd
> Coyote Gulch Productions (http://www.coyotegulch.com)
> Software Invention for High-Performance Computing
> In development: Alex, a database for common folk


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