This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] lno branch merge -- vectorizer patch #1
- From: Steven Bosscher <stevenb at suse dot de>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 3 Aug 2004 17:31:01 +0200
- Subject: Re: [patch] lno branch merge -- vectorizer patch #1
- Organization: SUSE Labs
- References: <OFB3A81FC9.B04DF351-ONC2256ED9.00411695-C2256ED9.005A592B@il.ibm.com>
On Thursday 22 July 2004 18:26, Dorit Naishlos wrote:
> + /* An insn writing through a restricted pointer is "independent" of any
> + insn reading or writing through a different pointer, in the same
> + block/scope.
> + */
> + if ((TREE_CODE (ta) == POINTER_TYPE && TYPE_RESTRICT (ta)
> + && !DR_IS_READ(a))
> + || (TREE_CODE (tb) == POINTER_TYPE && TYPE_RESTRICT (tb)
> + && !DR_IS_READ(b)))
> + {
> + *differ_p = true;
> + return true;
> + }
This is not the semantics of 'restrict' the way I remember it (but of
course I may be wrong ;-) In tree.h the comment for TYPE_RESTRICT states:
/* If nonzero, this type is `restrict'-qualified, in the C sense of
the term. */
And the "C sense" (C semantics) is that two restrict-qualified pointers
cannot be aliases of the same object. But a restricted pointer and a
non-restricted pointer can still be aliases. So iiuc the above check
should set differ_p to false unless ta and tb are both restrict qualified
(and they are nor the same object, but that's checked earlier).
Gr.
Steven