Re: Enable pointer TBAA for LTO

2015-11-26 Thread Thomas Schwinge
Hi! On Mon, 23 Nov 2015 18:34:30 +0300, Ilya Verbin wrote: > On Mon, Nov 23, 2015 at 16:31:42 +0100, Richard Biener wrote: > > I think it also causes the following and one related ICE > > > > FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal compiler > > error) >

Re: Enable pointer TBAA for LTO

2015-11-25 Thread Jan Hubicka
> > Might be a bit expensive though. It also reminds me of all the > ICEs we have PRs for WRT the type verifier. Remember we are in stage3 > now so rather than introducing new issues you should spend some time > fixing the existing ones you caused ;)) (just look for bugs > CCed to

Re: Enable pointer TBAA for LTO

2015-11-25 Thread Richard Biener
On Tue, 24 Nov 2015, Jan Hubicka wrote: > > > Now alias set of the initialization is alias set of "struct a". The alias > > > set > > > of of the pointer store is "float *". We ask alias oracle if "struct a" > > > can > > > conflict with "float *" and answer is no, because "int *" (component

Re: Enable pointer TBAA for LTO

2015-11-25 Thread James Greenhalgh
On Tue, Nov 24, 2015 at 07:10:01AM +0100, Jan Hubicka wrote: > > On November 23, 2015 5:50:25 PM GMT+01:00, Jan Hubicka > > wrote: > > >> > > >> I think it also causes the following and one related ICE > > >> > > >> FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal

Re: Enable pointer TBAA for LTO

2015-11-24 Thread Jan Hubicka
> > Now alias set of the initialization is alias set of "struct a". The alias > > set > > of of the pointer store is "float *". We ask alias oracle if "struct a" can > > conflict with "float *" and answer is no, because "int *" (component of > > struct > > b) and "float *" are not conflicting.

Re: Enable pointer TBAA for LTO

2015-11-24 Thread Richard Biener
On Mon, 23 Nov 2015, Jan Hubicka wrote: > > > > Please in future leave patches for review again if you do such > > big changes before committing... > > Uhm, sorry, next time I will be more cureful. It seemed rather easy after > debugging it but indeed it is somewhat surprising issue. > > > >

Re: Enable pointer TBAA for LTO

2015-11-24 Thread Richard Biener
On Tue, 24 Nov 2015, Jan Hubicka wrote: > > On November 23, 2015 5:50:25 PM GMT+01:00, Jan Hubicka > > wrote: > > >> > > >> I think it also causes the following and one related ICE > > >> > > >> FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal > > >compiler > >

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Richard Biener
On Mon, 23 Nov 2015, Jan Hubicka wrote: > Hi, > here is updated patch which I finally comitted today. It addresses all the > comments > and also fixes one nasty bug that really cost me a lot of time to understand. > > + /* LTO type merging does not make any difference between > +

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Eric Botcazou
> You are right, TYPE_NONALIASED_COMPONENT is the wrong way. I will fix it > and try to come up with a testcase (TYPE_NONALIASED_COMPONENT is quite > rarely used beast) It's only used in Ada as far as I know, but is quite sensitive and quickly leads to wrong code if not handled properly in my

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Martin Jambor
Hi, On Mon, Nov 23, 2015 at 12:00:25AM +0100, Jan Hubicka wrote: > Hi, > here is updated patch which I finally comitted today. It addresses all the > comments > and also fixes one nasty bug that really cost me a lot of time to understand. > > + /* LTO type merging does not make any

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Jan Hubicka
> On November 23, 2015 5:50:25 PM GMT+01:00, Jan Hubicka wrote: > >> > >> I think it also causes the following and one related ICE > >> > >> FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal > >compiler > >> error) > >> > >> >

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Jan Hubicka
> I don't understand why we need this (testcase?) because get_alias_set () > is supposed to do the alias-set of pointer globbing for us. Hi, After some experimentation I managed to derive self contained testcase (other than GCC itself). struct a/b/c gets the same TYPE_CANONICAL which is different

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Richard Biener
On Mon, 23 Nov 2015, Martin Jambor wrote: > Hi, > > On Mon, Nov 23, 2015 at 12:00:25AM +0100, Jan Hubicka wrote: > > Hi, > > here is updated patch which I finally comitted today. It addresses all the > > comments > > and also fixes one nasty bug that really cost me a lot of time to > >

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Ilya Verbin
On Mon, Nov 23, 2015 at 16:31:42 +0100, Richard Biener wrote: > I think it also causes the following and one related ICE > > FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal compiler > error) > > /space/rguenther/src/svn/trunk3/gcc/testsuite/gcc.dg/vect/pr62021.c:7:1: > internal

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Jan Hubicka
> > I think it also causes the following and one related ICE > > FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal compiler > error) > > /space/rguenther/src/svn/trunk3/gcc/testsuite/gcc.dg/vect/pr62021.c:7:1: > internal compiler error: in get_alias_set, at alias.c:880^M >

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Richard Biener
On November 23, 2015 5:50:25 PM GMT+01:00, Jan Hubicka wrote: >> >> I think it also causes the following and one related ICE >> >> FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal >compiler >> error) >> >>

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Jan Hubicka
> > Please in future leave patches for review again if you do such > big changes before committing... Uhm, sorry, next time I will be more cureful. It seemed rather easy after debugging it but indeed it is somewhat surprising issue. > > I don't understand why we need this (testcase?) because

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Jan Hubicka
> > You are right, TYPE_NONALIASED_COMPONENT is the wrong way. I will fix it > > and try to come up with a testcase (TYPE_NONALIASED_COMPONENT is quite > > rarely used beast) > > It's only used in Ada as far as I know, but is quite sensitive and quickly > leads to wrong code if not handled

Re: Enable pointer TBAA for LTO

2015-11-22 Thread Jan Hubicka
> > + tree t = TREE_TYPE (field); > > + if (in_lto_p) > > + { > > + /* VECTOR_TYPE and ARRAY_TYPE share the alias set with their > > + element type and that type has to be normalized to void *, > > + too, in the case it is a pointer. */ > > +

Re: Enable pointer TBAA for LTO

2015-11-22 Thread Jan Hubicka
Hi, here is updated patch which I finally comitted today. It addresses all the comments and also fixes one nasty bug that really cost me a lot of time to understand. + /* LTO type merging does not make any difference between +component pointer types. We may have + +

Re: Enable pointer TBAA for LTO

2015-11-22 Thread Eric Botcazou
> + tree t = TREE_TYPE (field); > + if (in_lto_p) > + { > + /* VECTOR_TYPE and ARRAY_TYPE share the alias set with their > +element type and that type has to be normalized to void *, > +too, in the case it is a pointer. */ > +

Re: Enable pointer TBAA for LTO

2015-11-11 Thread Richard Biener
On Tue, 10 Nov 2015, Jan Hubicka wrote: > > > Index: tree.c > > > === > > > --- tree.c(revision 229968) > > > +++ tree.c(working copy) > > > @@ -13198,6 +13198,7 @@ gimple_canonical_types_compatible_p (con > > >/*

Re: Enable pointer TBAA for LTO

2015-11-11 Thread Bernd Schmidt
On 11/11/2015 10:21 AM, Richard Biener wrote: On Tue, 10 Nov 2015, Jan Hubicka wrote: The reason is that TYPE_CANONICAL is initialized in get_alias_set that may be called before we finish all merging and then it is more fine grained than what we need here (i.e. TYPE_CANONICAL of pointers to two

Re: Enable pointer TBAA for LTO

2015-11-11 Thread Jan Hubicka
> On 11/11/2015 10:21 AM, Richard Biener wrote: > >On Tue, 10 Nov 2015, Jan Hubicka wrote: > >>The reason is that TYPE_CANONICAL is initialized in get_alias_set that may > >>be > >>called before we finish all merging and then it is more fine grained than > >>what > >>we need here (i.e.

Re: Enable pointer TBAA for LTO

2015-11-11 Thread Jan Hubicka
> > On 11/11/2015 10:21 AM, Richard Biener wrote: > > >On Tue, 10 Nov 2015, Jan Hubicka wrote: > > >>The reason is that TYPE_CANONICAL is initialized in get_alias_set that > > >>may be > > >>called before we finish all merging and then it is more fine grained than > > >>what > > >>we need here

Re: Enable pointer TBAA for LTO

2015-11-10 Thread Jan Hubicka
> > Index: tree.c > > === > > --- tree.c (revision 229968) > > +++ tree.c (working copy) > > @@ -13198,6 +13198,7 @@ gimple_canonical_types_compatible_p (con > >/* If the types have been previously registered and found equal > >

Re: Enable pointer TBAA for LTO

2015-11-10 Thread Richard Biener
On Sun, 8 Nov 2015, Jan Hubicka wrote: > Hi, > this patch adds basic TBAA for pointers to LTO. The basic scheme is simple; > because TYPE_CANONICAL is not really needed by get_alias_set, we completely > drop the caluclation of these (which also saves about 50% canonical type hash > searches) and

Enable pointer TBAA for LTO

2015-11-08 Thread Jan Hubicka
Hi, this patch adds basic TBAA for pointers to LTO. The basic scheme is simple; because TYPE_CANONICAL is not really needed by get_alias_set, we completely drop the caluclation of these (which also saves about 50% canonical type hash searches) and update get_alias_set to not punt on pointers with