[patch] (4.1 project list, stage 1.1) vectorizer alignment improvements
Dorit Naishlos
DORIT@il.ibm.com
Mon Mar 14 14:37:00 GMT 2005
Richard Henderson <rth@gcc.gnu.org> wrote on 14/03/2005 16:03:18:
> On Sun, Mar 13, 2005 at 04:36:30PM +0200, Dorit Naishlos wrote:
> > * tree-vectorizer.h (unknown_alignment_for_access_p): Replaced by
> > known_alignment_for_access_p.
> > ...
>
> Ok, except,
>
> > + /* Function vect_determine_vectorization_factor
> > +
> > + */
>
> Might want to be a bit more descriptive here.
>
:-)
ok with this?:
+ /* Function vect_determine_vectorization_factor
+
+ Determine the vectorization factor (VF). VF is the number of data
elements
+ that are operated upon in parallel in a single iteration of the
vectorized
+ loop. For example, when vectorizing a loop that operates on 4byte
elements,
+ on a target with vector size (VS) 16byte, the VF is set to 4, since 4
+ elements can fit in a single vector register.
+
+ We currently support vectorization of loops in which all types
operated upon
+ are of the same size. Therefore this function currently sets VF
according to
+ the size of the types operated upon, and fails if there are multiple
sizes
+ in the loop.
+
+ VF is also the factor by which the loop iterations are strip-mined,
e.g.:
+ original loop:
+ for (i=0; i<N; i++){
+ a[i] = b[i] + c[i];
+ }
+
+ vectorized loop:
+ for (i=0; i<N; i+=VF){
+ a[i:VF] = b[i:VF] + c[i:VF];
+ }
+
+ */
thanks,
dorit
>
> r~
More information about the Gcc-patches
mailing list