This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More on c-gimplify.c:gimplify_decl_stmt
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 7 Jun 2004 10:04:21 -0700
- Subject: Re: More on c-gimplify.c:gimplify_decl_stmt
- References: <10406071656.AA11227@vlsi1.ultra.nyu.edu>
On Mon, Jun 07, 2004 at 12:56:24PM -0400, Richard Kenner wrote:
> > Saying that the first reference uses field F1 of a type and the second
> > reference uses field F2 of that same type says they can't alias.
>
> True, but only for structures (as opposed to unions or variant records).
> And for structures, the offsets are unique.
>
> I don't follow. We're talking about a nest of references and there are
> intermediate fields.
I don't follow. Sure there's a nest of references. So what? I don't
see how that affects my argument at all.
> Not at all. We've *got* a biased index -- the offset into the record.
> We can strength reduce on offset 15+4*i just as easy as we can for [i].
>
> For strength-reduction, sure. But I was thinking more of the LNO-style
> optimizations.
The scalar evolution code on the LNO branch can handle a simple linear
equation such as 15+4*i ({15,+,4}) just as easily as a simple direct
index ({0,+,1}). We are not losing any functionality there.
r~