This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] for optimization/10080: Loop unroller nearly useless
- From: Roger Sayle <roger at eyesopen dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 4 Nov 2003 09:25:26 -0700 (MST)
- Subject: Re: [PATCH] for optimization/10080: Loop unroller nearly useless
> * cfgloopanal.c (variable_initial_value, variable_initial_values,
> simple_loop_exit_p): Record the fact that initial value is extended
> from inner mode.
> (count_strange_loop_iterations, count_loop_iterations): Handle
> ivs that iterate in a narrower mode. Fix handling of overflows.
> Improve handling of NE conditions.
> (inverse, fits_in_mode_p): New static functions.
> (simple_increment): Detect variables that iterate in a narrower mode.
> * cfgloop.h (struct loop_desc): Fields inner_mode and extend added.
This patch is OK.
I've just retested the patch on mainline on both alphaev67-dec-osf5.1 and
i686-pc-linux-gnu with full bootstraps and regression tests, both with
no new failures and confirmed that on the alpha it resolves the problem
unrolling constant iteration loops on the alpha.
Falk, you may want to open a new PR for the "enhancement" request for
non-constant iteration loops that's also mentioned in PR opt/10080. I
think the PR itself can be closed as Zdenek's patch fixes the regression.