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: [RFC] ignoring type alias conflicts between structures andscalars


On Thu, 2004-11-25 at 13:41 -0700, Jeffrey A Law wrote:

> I don't think that patch is as-is safe.  You have to know something
> about the objects.  Specifically that one is in global memory and
> that the other object is referenced via simple structure references
> (as opposed to pointer indirections).
> 
Hmm?  But if we just have a structure reference and a global variable,
we won't ever have this problem.  The aliasing code doesn't look at
those.  It only ever looks at pointers vs addressable variables.  It
doesn't care about other variables.

> Hmm, maybe we're losing each other on the structure reference stuff;
> I might be responsible for that by writing x->y when I meant x.y
> The former has pointer indirection, at which points all bets are
> likely off.
> 
Yeah, that was probably it.  If you meant x.y then we will never even
consider x and the global for aliasing.  The problem is when you have x-
>y.  The original code that you sent me had a pointer to a 'struct
basic_block_def' and a global variable of type 'int'.

Too bad this is not well defined in the standard.  We could've gotten a
pretty decent gain if we could ignore these kinds of aliases.


Diego.


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