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] Loop distribution for single nested loops


On 10/3/07, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:
> yes, but even then in many cases loop distribution does not help
> vectorization (either because the created loops still are not
> vectorizable, or because the original loop was vectorizable even without
> the loop distribution); i.e., vectorizer has to somehow drive the loop
> distribution, telling it which loops need to be split.
>

Right.  I was thinking about making the vectorizer asking for loop
distribution when there are two or more unaligned stores, when the
vectorization fails for the moment.

I also have spoken with Harsha about the cost model for this
transformation, and it is quite difficult to estimate: the fact that
we split loops make some loops parallel, decreases register pressure
and probably also have a positive effect on the locality of the data
in the caches, as we have to process less data in the loops.  But at
the same time, we introduce more control, i.e. new loops, redo some
scalar computations, such as new ivs, and probably have to reload the
same data several times, a negative effect on data locality.

So we still have to implement a good cost function for making this
transform happen all the time in -O3.

Sebastian


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