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]

[patch] Vectorizer: resolve mix of pointer and object: take 2 part 2





Dorit Naishlos/Haifa/IBM wrote on 23/01/2005 18:41:22:
> There are actually two places where we are mixing pointers and objects.
> This patch partially addresses one of them:
>
> (1) The data we store in VECT_DR_BASE and in DR_BASE is sometimes an
> address and sometimes an object. The first of the two should always
> be a pointer, and this is indeed fixed by this patch (while also
> renaming the macro to VECT_DR_BASE_ADDRESS). The second should
> always be an object, and this was not addressed by this patch
> (didn't notice it before). We'll send these bits separately from the
rest:
>

The second part of this patch: always store an object in DR_BASE of
data_reference structure.
With this part of the patch a loop in vect-73.c is temporarily not
vectorizable, it will be vectorized again with the third part of the patch
(coming up).

Until now, since DR_BASE_NAME was sometimes an address and sometimes an
object, it was incorrect to compare them.
The function array_base_name_differ_p now handles only pairs of objects.
For two pointers or for pointer and address of object we call (in
vect_base_addr_differ_p) alias_sets_conflict_p. Testcase is attached.

Bootstrapped and tested on ppc-darwin.
O.K. for mainline?

Thanks,
Ira

Changelog entry:

2005-02-19  Ira Rosen  <irar@il.ibm.com>

      * tree-data-ref.c (array_base_name_differ_p): Check that the bases
      exist and are objects. Remove checks for pointer.
      * tree-vectorizer.c (vect_create_addr_base_for_vector_ref): Use
      STMT_VINFO_VECT_DR_BASE_ADDRESS instead of DR_BASE_NAME.
      (vect_create_data_ref_ptr): Likewise.
      (vect_base_addr_differ_p): New function.
      (vect_analyze_data_ref_dependence): Call vect_base_addr_differ_p.
      (vect_analyze_pointer_ref_access): Add output parameter - ptr_init.
      Don't set the DR_BASE_NAME field of data-ref.
      (vect_get_memtag_and_dr): Use ptr_init instead of DR_BASE_NAME.

Patch 2:
(See attached file: patch2)

Testcase:
(See attached file: vect-96.c)

Attachment: patch2
Description: Binary data

Attachment: vect-96.c
Description: Binary data


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