This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix the one entry mem{{,p}cpy,move,set} optimization aliasing issues (PR middle-end/29272)


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]