This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enable -fmove-loop-invariants by default when -fprofile-use is specified
- From: Steven Bosscher <stevenb at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Peter Steinmetz <steinmtz at us dot ibm dot com>, Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, mark at codesourcery dot com
- Date: Sat, 29 Oct 2005 22:17:21 +0200
- Subject: Re: [PATCH] Enable -fmove-loop-invariants by default when -fprofile-use is specified
- References: <OFB00F9FB2.DED1CF2F-ON86257091.00563B6F-86257091.0058231F@us.ibm.com>
On Wednesday 05 October 2005 18:02, Peter Steinmetz wrote:
> There was some discussion in late Aug, early Sept. on a performance
> regression I observed when using -fprofile-generate and -fprofile-use.
>
> See: http://gcc.gnu.org/ml/gcc/2005-08/msg00899.html
>
> This patch enables -fmove-loop-invariants when -fprofile-use is specified
> in order to compensate for some of the optimizations lost by disabling the
> old loop optimizer. There was general agreement that this would be a good
> thing to do.
>
> Profilebootstrapped and regression tested on powerpc64-unknown-linux-gnu
>
> Okay for mainline?
I don't think this is OK for mainline, -fmove-loop-invariants could
cause quite a few new regressions. I tested -fmove-loop-invariants
by enabling it by default at -O2 and better for a few targets (ppc,
ppc64, i686, x86_64, and ia64). Some failed to bootstrap, and others
had some regressions. Some of those failures are probably fixed now,
but enabling a new pass in stage3 is just too late IMVHO.
This is PR24408 in bugzilla, and it is a regression from GCC 4.0, so
perhaps we can fix this problem for later 4.1 releases by back-porting
bits from mainline. But for now, I don't think there is much you can
do to fix this bug (other than maybe trying really hard to find and fix
remaining problems in loop-invariant.c, and convincing Mark that this
is important enough ;-)
I know Zdenek has an improved loop-invariant.c on his killloop branch,
but I don't know if it's any better or stabler than the one on mainline
so this may not help you either. But you could try...
Gr.
Steven