This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Teach vrp that THIS pointer and references are non-zero
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Mon, 13 Apr 2015 14:18:40 +0200 (CEST)
- Subject: Re: Teach vrp that THIS pointer and references are non-zero
- Authentication-results: sourceware.org; auth=none
- References: <20150413101249 dot GB61490 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1504131348340 dot 6786 at zhemvz dot fhfr dot qr> <20150413121730 dot GA11125 at atrey dot karlin dot mff dot cuni dot cz>
On Mon, 13 Apr 2015, Jan Hubicka wrote:
> > On Mon, 13 Apr 2015, Jan Hubicka wrote:
> >
> > > Hi,
> > > with multiple inheritance compiling the testcase bellow, the first call always
> > > leads to call with offseted pointer, while the other call results in if
> > > conditoinal testing if parameter is non-NULL.
> > >
> > > This patch teach VRP that THIS pointers and references are non-zero. I hope
> > > this is true also for fortran and ada, but I think both languages do not really
> > > have NULL.
> > >
> > > I think VRP could basically assume all reference pointers to be non-zero, but
> > > I am not sure how to do that with GIMPLE useless conversion rules.
> > >
> > > Bootstrapped/regtested x86_64-linux, OK?
> >
> > Hmm - doesn't ESRA remove unused this eventually so this falls apart?
>
> It changes METHOD_TYPE to FUNCTION_TYPE then.
I see. Patch is ok then with Jakubs fixes.
Thanks,
Richard.