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 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.


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