This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix the one entry mem{{,p}cpy,move,set} optimization aliasing issues (PR middle-end/29272)
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Sep 2006 00:56:23 -0700
- Subject: Re: [PATCH] Fix the one entry mem{{,p}cpy,move,set} optimization aliasing issues (PR middle-end/29272)
- References: <20060929075035.GQ20982@devserv.devel.redhat.com>
On Fri, 2006-09-29 at 03:50 -0400, Jakub Jelinek wrote:
> memcpy (&p->i, &f, sizeof (p->i));
> I think we could optimize the latter if we arranged for the store
> (and/or read) to be done in alias set 0, but am not sure how exactly
> to arrange it now.
You generate a new type with an aliasing set of 0 like how may_alias
attribute works. I think I had a patch[1] for memcmp which did that.
Hmm, looking back at my patch, I noticed it would only work for C based
front-ends because may_alias attribute is not handled in the general
code but in c-common.c.
Thanks,
Andrew Pinski
[1] http://gcc.gnu.org/ml/gcc-patches/2003-08/txt00024.txt