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: [lno] [patch] vectorizer update - loop bound


On Sun, Jan 18, 2004 at 12:52:52PM +0200, Dorit Naishlos wrote:
> 
> The patch below implements a more general loop bound transformation scheme
> - still limited to known loop bound that divides by the vectorization
> factor, but no longer dependent on the loop IV eolution and the loop exit
> condition form.  This allows relaxing the restrictions that the vectorizer
> imposed on the loop exit condition, and use the precomputed
> loop->nb_iterations instead (from the monev analyzer). As a result, two of
> the loops in the test case tree-ssa-vect-none.c (#12 and #13) are now
> vectorizable, and are therefore moved to tree-ssa-vect-all.c.
> 

Excellent, 

I have a single remark on the use of the loop->nb_iterations: instead
of accessing directly the field: 

!   niters = loop->nb_iterations;

it is better to call the access function:

      niters = number_of_iterations_in_loop (loop);

that verifies that the loop->nb_iterations has already been computed,
and otherwise, calls the analyzer that compute its value.  I will
probably disable the analysis of all the loop counts, and then the 
analysis will be completely on demand.  

> bootstrapped and passed the regression tests on powerpc-apple-darwin7.0.0.
> 

thanks, 

you can also not bootstrap nor test your changes since they don't
really affect the behaviour of the compiler by default.  The only
thing you should care is that there are no warnings in the
tree-vectorizer.c when it compiles.


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