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]

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


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)

Attachment: patch.April18
Description: Binary data


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