RFC: add inheritance support to nonoverlapping_component_refs_p

Dan Nicolaescu dann@godzilla.ICS.UCI.EDU
Sat May 25 12:09:00 GMT 2002


Richard Henderson <rth@redhat.com> writes:

  > On Wed, Apr 03, 2002 at 02:14:11PM -0800, Dan Nicolaescu wrote:
  > > 	* alias.c (nonoverlapping_component_refs_p): Look for fields in
  > > 	BINFOs too. 
  > 
  > The patch is incomplete.  You need to recursively search base
  > classes.  For example, your patch will fail the attached test.
  >
  > Incidentally, this is the sort of test cases you should be
  > writing to accompany your aliasing patches.  If the aliasing
  > works as designed, the compiler can prove some property and
  > simplify a conditional at compile-time.

Yep, that's smart. I was using the stairing at the generated assembly
method :-(

  > I think the attached patch will do what you want.  I've only
  > tested it on the given test case.  It needs something more
  > thorough before being checked in.  Since you have an interest,
  > would you mind doing that?  

OK. I've already found a case it doesn't handle. I'll try to fix
that too. But I need a few days for this.

  > You might also see if you can re-factor it a bit to ensure
  > tail-recursion elimination in some cases, and/or hoist controling
  > expressions into callers.



More information about the Gcc-patches mailing list