Re: Do less generous pointer globbing in alias.c

2015-06-10 Thread Martin Liška
On 05/27/2015 07:28 AM, Jan Hubicka wrote: > Hi, > this patch makes it possible for non-LTO alias oracle to TBAA disambiguate > pointer types. It makes void * conflicting with all of them and does not put > it > to alias set 0. It also preserves the property that qualifiers of pointer-to > type sh

Re: Do less generous pointer globbing in alias.c

2015-05-31 Thread Jan Hubicka
> The problem is that ipa_icf::sem_function::parse is lacking the f->init > call and the function epilog, falling through to the next function that > happens to follow. Thank you, that is indeed the devirtualization issue - I suppose the function descriptors confuses the code even more. I will fi

Re: Do less generous pointer globbing in alias.c

2015-05-31 Thread Andreas Schwab
The problem is that ipa_icf::sem_function::parse is lacking the f->init call and the function epilog, falling through to the next function that happens to follow. Revision r223897: Dump of assembler code for function ipa_icf::sem_function::parse(cgraph_node*, bitmap_obstack*): 0x4194c

Re: Do less generous pointer globbing in alias.c

2015-05-31 Thread Andreas Schwab
Jan Hubicka writes: > I am not sure I have access to working ia64 box. Can you possibly help me > to debug this? Is it devirtualization related? Here's a backtrace: 0x40422311 in bitmap_obstack_alloc_stat ( bit_obstack=0x4194cf20 ) at ../../gcc/bitmap.c:288 288 b

Re: Do less generous pointer globbing in alias.c

2015-05-30 Thread Jan Hubicka
> Jan Hubicka writes: > > > * alias.c (alias_set_entry_d): Add is_pointer and has_pointer. > > (alias_stats): Add num_universal. > > (alias_set_subset_of): Special case pointers; be ready for NULL > > children. > > (alias_sets_conflict_p): Special case pointers; be ready for N

Re: Do less generous pointer globbing in alias.c

2015-05-30 Thread Andreas Schwab
Jan Hubicka writes: > * alias.c (alias_set_entry_d): Add is_pointer and has_pointer. > (alias_stats): Add num_universal. > (alias_set_subset_of): Special case pointers; be ready for NULL > children. > (alias_sets_conflict_p): Special case pointers; be ready for NULL

Re: Do less generous pointer globbing in alias.c

2015-05-30 Thread H.J. Lu
On Thu, May 28, 2015 at 1:12 PM, Jan Hubicka wrote: > hello, > only providing you the testcase why I need transitive closure of "contains > pointer" via the extra child I noticed that there is extra symmetry to handle: > > struct a {void *ptr;} > char **ptr = (char **)&a.ptr; > ptr

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
hello, only providing you the testcase why I need transitive closure of "contains pointer" via the extra child I noticed that there is extra symmetry to handle: struct a {void *ptr;} char **ptr = (char **)&a.ptr; ptr = ... This one doesn't really fly with my extra subset code, beca

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
> > +alias_set_entry > > +init_alias_set_entry (alias_set_type set) > > +{ > > + alias_set_entry ase = ggc_cleared_alloc (); > > no need to use cleared_alloc if you also init ->is_pointer to false. OK, will update the patch. > > > + ase->alias_set = set; > > + ase->children > > += hash_map

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Richard Biener
On Thu, 28 May 2015, Jan Hubicka wrote: > Hi, > here is updated version of patch. It makes alias_set_subset_of to be > symmetric for > ptr_type_node and other pointer type and moves the logic of creating subsets > to get_alias_set. > > I tested that perlbmk works when built at -O3 x86_64 > >

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
Hi, here is updated version of patch. It makes alias_set_subset_of to be symmetric for ptr_type_node and other pointer type and moves the logic of creating subsets to get_alias_set. I tested that perlbmk works when built at -O3 x86_64 Bootstrapped/regtested x86_64-linux, OK? Honza *

Re: Do less generous pointer globbing in alias.c

2015-05-27 Thread Jan Hubicka
> >Hmm, what about > > > >union t {int a; char b;}; > > > >int a; > >uniont t *ptr=&a; > >*ptr = ... > > > >If we want to define this, aliasing_component_refs_p would IMO need to > >be symmetrized, too. > >I am happy leaving this undefined. > > Globbing all pointers was soo simple... :) Indeed,

Re: Do less generous pointer globbing in alias.c

2015-05-27 Thread Richard Biener
On May 27, 2015 5:04:13 PM GMT+02:00, Jan Hubicka wrote: >> > Yes, so is >> > >> > struct foo {struct bar a;}; >> > >> > a.a = ... >> > ... = a; >> > >> > and >> > >> > a = ... >> > ... = a.a; >> > >> > this is why conflict is symmetrization of the subset relation. >> >> >> OK the s

Re: Do less generous pointer globbing in alias.c

2015-05-27 Thread Jan Hubicka
> > Yes, so is > > > > struct foo {struct bar a;}; > > > > a.a = ... > > ... = a; > > > > and > > > > a = ... > > ... = a.a; > > > > this is why conflict is symmetrization of the subset relation. > > > OK the statement above is true, but subsets alone are not quite right for use > in

Re: Do less generous pointer globbing in alias.c

2015-05-27 Thread Jan Hubicka
> Yes, so is > > struct foo {struct bar a;}; > > a.a = ... > ... = a; > > and > > a = ... > ... = a.a; > > this is why conflict is symmetrization of the subset relation. OK the statement above is true, but subsets alone are not quite right for use in aliasing_component_refs_p void

Re: Do less generous pointer globbing in alias.c

2015-05-27 Thread Jan Hubicka
> > Hi, this patch makes it possible for non-LTO alias oracle to TBAA > > disambiguate pointer types. It makes void * conflicting with all of them > > and does not put it to alias set 0. It also preserves the property that > > qualifiers of pointer-to type should not matter to determine the alia

Re: Do less generous pointer globbing in alias.c

2015-05-27 Thread Richard Biener
On Wed, 27 May 2015, Jan Hubicka wrote: > Hi, this patch makes it possible for non-LTO alias oracle to TBAA > disambiguate pointer types. It makes void * conflicting with all of them > and does not put it to alias set 0. It also preserves the property that > qualifiers of pointer-to type should

Re: Do less generous pointer globbing in alias.c

2015-05-26 Thread Jan Hubicka
> Hi, > this patch makes it possible for non-LTO alias oracle to TBAA disambiguate > pointer types. It makes void * conflicting with all of them and does not put > it > to alias set 0. It also preserves the property that qualifiers of pointer-to > type should not matter to determine the alias set