[lno] [patch] vectorizer minor update - use simpler addressing

Dorit Naishlos DORIT@il.ibm.com
Sun Apr 18 19:35:00 GMT 2004


This patch changes the scheme that was used to handle memory accesses in
the vectorizer; References 'a[i]' to a scalar array 'a':
      SI a[N];
Are vectorized using a pointer:
      V4SI *vect_pa;
      vect_pa = (V4SI *)&a;
The previous scheme vectorized scalar references such as 'x = a[i];' using
pointer arithmetic:
      i' = i * 16;
      vect_pa' = vect_pa + i';
      vx = (* vect_pa');
The new scheme uses array addressing instead:
      vx = (* vect_pa)[i];

dorit.

        * tree-vectorizer.c (create_index_for_array_ref): Remove code under
        #ifdef POINTER_ARITHMETIC.
        (vect_create_data_ref): Likewise. Support array addressing
        instead of pointer arithmetic in vectorized code.

(See attached file: patch.April18)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.April18
Type: application/octet-stream
Size: 17176 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040418/6a8f79d2/attachment.obj>


More information about the Gcc-patches mailing list