auto vectorization - should this work ?

Richard Guenther richard.guenther@gmail.com
Sun May 6 13:17:00 GMT 2007


On 5/6/07, Ira Rosen <IRAR@il.ibm.com> wrote:
>
> Yes, this should get vectorized. The problem is in data dependencies
> analysis. We fail to prove that s_5->a[i_16] and s_5->a[i_16] access the
> same memory location. I think, it happens since when we compare the bases
> of the data references (s_5->a and s_5->a) in base_object_differ_p(), we do
> that by comparing the trees (which are pointers) and not their content.
>
> I'll look into this and, I hope, I will submit a fix for that soon (I guess
> using operand_equal_p instead).

Duh, that function looks interesting, indeed ;)

It should probably use get_base_address () to get at the base object
and then operand_equal_p to compare them.  Note that it strips outer
variable offset as well, like for a[i].b[j] you will get 'a' as the base object.
If data-ref cannot handle this well, just copy get_base_address () and
stop at the first ARRAY_REF you come along.  But maybe
base_object_differ_p is only called from contexts that are well-defined
in this regard.

Richard.



More information about the Gcc mailing list