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] Enable -fmove-loop-invariants by default when -fprofile-use is specified


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


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