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: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, Ian Lance Taylor <iant at google dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Oct 2006 13:37:55 +0200
- 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> <200610041253.41407.ebotcazou@adacore.com> <20061004111907.GT20982@devserv.devel.redhat.com>
> When I use just build1 rather than fold_build_indirect_ref I get the IMHO
> right one:
>
> ;; Function foo (foo)
> ;; enabled by -tree-original
> {
> struct T * p = (struct T *) s;
>
> struct T * p = (struct T *) s;
> *(struct T * * {ref-all}) &p->t = *(struct T * * {ref-all}) &t.t;, (void
> *) &p->t;; }
>
> for the 29272 testcase. But already at *.gimple that's bad again:
>
> foo (s)
> {
> struct T * D.1530;
> struct T * p;
>
> p = (struct T *) s;
> D.1530 = t.t;
> p->t = D.1530;
> }
>
> and no ref-all in sight.
Yes, your pointers are not ref-all from the beginning.
--
Eric Botcazou