This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should -fcross-jumping be part of -O1?
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Scott Robert Ladd <coyote at coyotegulch dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Sun, 23 Nov 2003 17:22:48 +0100
- Subject: Re: Should -fcross-jumping be part of -O1?
- References: <3FC0DCD0.9000106@coyotegulch.com>
> 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