This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: alias.c:nonoverlapping_component_refs_p
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Dec 2001 18:04:07 -0800
- Subject: Re: alias.c:nonoverlapping_component_refs_p
- References: <10112032326.AA12179@vlsi1.ultra.nyu.edu>
On Mon, Dec 03, 2001 at 06:26:12PM -0500, Richard Kenner wrote:
> But that's if there's no record rep clause. If there is, then the
> hierarchy is collapsed and it's represented as a single RECORD_TYPE.
> Also, subtypes get collapsed similarly.
Err.. why? What can you do with a collapsed represenation that
you can't do with the uncollapsed representation? It's all
compiler internals after all...
> I don't follow. Why isn't this known from the tree? Are you concerned about
> value propagation of pointers here?
Yes. In particular,
struct S {
long w, x, y, z;
};
static inline void foo(struct S *s) { s->x = 0; }
extern void bar(struct S *s);
struct S test(void)
{
struct S asdf;
foo(&asdf);
bar(&asdf);
}
I'd expect this sort of example to be fairly common in C++, where
FOO winds up being an inline member function and the passed struct
being the object manipulated.
r~