[patch] Make jump threading preserve loops

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon Nov 20 18:54:00 GMT 2006


> > Two options to consider (beyond really calling vect_analyze_loop):
> > - don't peel if -ftree-vectorize is on
> Probably overkill.

IMHO, jump threading should not peel loops at all, and leave this
transformation on optimizers that know what they are doing
(loop peeling by itself is profitable only under quite specific


> > - maybe just check dependences in the loop, as a measure to evaluate
> > vectorizability. it's an anlysis that is useful to have as a stand-alone
> > anyhow (and mostly already is - compute_data_dependences_for_loop I guess).\
> This is roughly what I was suggesting -- apply a set of simple tests
> which can (cheaply) determine if a loop might be vectorizable -- erring
> on the side of assuming the loop might be vectorizable.
> I wouldn't be terribly surprised to find that there's a few tests we
> can apply which would allow us to identify a significant portion of
> the unvectorizable loops.
> > this would still spoil the alignment, which is *very* unfortunate. People
> > put a lot of attention to structuring their code such that the data would
> > be aligned for vectorization (just two recent examples:
> > http://gcc.gnu.org/ml/gcc/2006-11/msg00084.html,
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27827#c56). I think we should
> > strongly consider Jeff's comment above.
> Good point.  
> jeff

More information about the Gcc-patches mailing list