This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Aliasing violation generated by fold_builtin_memcmp?
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 30 Sep 2005 13:05:54 -0400
- Subject: Re: Aliasing violation generated by fold_builtin_memcmp?
- References: <10509301645.AA18472@vlsi1.ultra.nyu.edu>
On Fri, 2005-09-30 at 12:45 -0400, Richard Kenner wrote:
> > What's special here is the pointer type, not the underlying type.
>
> Which means that everywhere that handles pointer types and aliasing has
> to be modified to check this magic.
>
> At the RTL level, there's just one place that computes the alias set of an
> expression and it knows about that flag. It was the only place that had
> to be modified to support it, as I recall. One would hope that knowlege
> of this semantics can be similarly localized at the tree level. Why can't it?
Because the RTL level only supports type based aliasing, and very simple
TBAA at that.
You are saying that an access through this pointer can point to
anything, regardless of what we think it points to.
This leaves 3 or 4 places at the tree level that need to be changed, and
possibly more later as more aliasing techniques are added.