This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Another case of DCE deleting live code
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: Richard Henderson <rth at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 10 Nov 2004 08:32:07 -0500
- Subject: Re: Another case of DCE deleting live code
- Organization: Red Hat Canada
- References: <10411101153.AA09342@vlsi1.ultra.nyu.edu>
On Wed, 2004-11-10 at 06:53, Richard Kenner wrote:
> I think it's actually fine to make this a variant because it's fine to remove
> the conversion: the only thing we really care about the alias set of is the
> INDIRECT_REF. So I'd suggest a TYPE_QUAL_ALIAS, which says to force the type
> to the alias set specified in TYPE_ALIAS_SET (so it's a little different than
> other qualifiers), but I'd also be OK with TYPE_QUAL_ALIAS0.
>
> Indeed I think this is a cleaner implementation and I'm perfectly willing to
> make this change. I think it's fine for Stage3 because only Ada uses this
> flag currently.
>
> Should I do this? I do have a test case for this, though finding it may
> be tricky.
>
Yes, please, and as for test cases, what's wrong with the one you
provided originally?
First, let me see if I understood the problem. We have a pointer P of
type 'TYPE *' and for some reason we know that P can actually point to
variables of any arbitrary type in the program. That is, 'TYPE *'
behaves like 'char *' in C?
If that is the case, then we already have a mechanism for dealing with
that. TYPE should be assigned alias set 0. The macro
TYPE_REF_CAN_ALIAS_ALL should not be necessary, at all. Having two
mechanisms for describing the same property will only give us trouble.
Diego.