Another case of DCE deleting live code

Diego Novillo dnovillo@redhat.com
Tue Nov 9 23:47:00 GMT 2004


On Tue, 2004-11-09 at 18:09, Daniel Berlin wrote:
> >>
> > Yes.  The tag_set we compute in get_tmt_for must be exactly what
> > get_alias_set returns.  We use that to determine which pointers get the
> > same alias set and other checks.
> 
> Why isn't get_alias_set returning 0 for types with that flag set, which 
> would avoid anything but get_alias_set being modified?
> 
Because that bit is set on TREE_TYPE (ptr) and what we are interested in
is TREE_TYPE (TREE_TYPE (ptr)) (ie, the type of the pointed-to memory
location).

I have to admit that TYPE_REF_CAN_ALIAS_ALL baffles me.  Sounds like an
early hack and it's placed in the wrong spot.  A pointer does not really
alias anything, it may *point* to other memory.  It is the pointed-to
memory location that may *alias* other variables.


Diego.



More information about the Gcc mailing list