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: [autovect] [patch] and aliasing question


On Tue, 2005-05-24 at 09:36 +0300, Ira Rosen wrote:
> 
> 
> 
> Hi,
> 
> This patch fixes parameters of get_alias_set in base_address_differ_p and
> base_object_differ_p. Instead of passing SSA_NAME, which is incorrect, we
> now pass an INDIRECT_REF itself. As a result tests vect-100.c, vect-77.c,
> vect-78.c, vect-96.c, no_version/vect-75.c, no_version/vect-76.c,
> no_version/vect-77.c, no_version/vect-78.c, no_version/vect-96.c  and
> no_version/pr20122.c don't get vectorized, because the alias analyzer can't
> determine that   a pointer passed to the function as a parameter and a
> local array don't alias (by the way, is that an expected behavior?),

Yes, but only if the array escapes :) if not, we should be able to say
that the parameter doesn't alias the array.


>  and
> (vect-100.c) that a pointer to struct and a global array don't alias.
> 
> As a followup patch I'd like to check the type memory tag directly and not
> call get_alias_set at all, as suggested by Diego. Is there an API that gets
> a type tag (or a symbol) and a declaration and determines whether a
> declaration is in may alias set of the tag, or do I have to go over the
> may-aliases of the tag myself?

You'll have to walk the list.

>  I also need a similar API to decide if two
> pointers alias.
> 
Same here.
However, the lists are provided for you :)

> Bootstrapped and tested on ppc-darwin. Committed to autovect branch.
> 
> Thanks,
> Ira
> 
> ChangeLog entry:
> 
>       * tree-data-ref.c (base_object_differ_p): Fix parameters of
> get_alias_set.
>       (base_addr_differ_p): Likewise.
> 
> Patch:
> (See attached file: diff.alias)


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