This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [autovect] [patch] Dependence tests and dimensions
Ira Rosen wrote:
>
> Yes, but p can point to a[0], i.e., two data-refs can access the same
> memory even though their dimensions differ. Do you agree?
>
Right.
But, why not keeping this simple test when we're sure both data refs
are arrays? Something like this:
/* When A and B are arrays and their dimensions differ, we directly
initialize the relation to "there is no dependence": chrec_known. */
if (DR_BASE_OBJECT (a) && DR_BASE_OBJECT (b)
&& DR_NUM_DIMENSIONS (a) != DR_NUM_DIMENSIONS (b))
{
DDR_ARE_DEPENDENT (res) = chrec_known;
return res;
}
The test is so simple and avoids to process inhomogeneous cases in
later tests.