This is the mail archive of the gcc@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: Another case of DCE deleting live code


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.


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