Re: Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Ian Lance Taylor
Jan Hubicka writes: >> >> >> >> OK. I wonder if we can/should carve off some bits to note >> >> type_with_linkage_p and type_in_anonymous_namespace_p in the tree >> >> itself? At least in type_common there's plenty of bits left. >> >> Not sure how expensive / reliable (non-C++?) those tests ot

Re: Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Jan Hubicka
> Jan Hubicka writes: > > >> > >> OK. I wonder if we can/should carve off some bits to note > >> type_with_linkage_p and type_in_anonymous_namespace_p in the tree > >> itself? At least in type_common there's plenty of bits left. > >> Not sure how expensive / reliable (non-C++?) those tests oth

Re: Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Ian Lance Taylor
Jan Hubicka writes: >> >> OK. I wonder if we can/should carve off some bits to note >> type_with_linkage_p and type_in_anonymous_namespace_p in the tree >> itself? At least in type_common there's plenty of bits left. >> Not sure how expensive / reliable (non-C++?) those tests otherwise are. >

Re: Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Jan Hubicka
> > OK. I wonder if we can/should carve off some bits to note > type_with_linkage_p and type_in_anonymous_namespace_p in the tree > itself? At least in type_common there's plenty of bits left. > Not sure how expensive / reliable (non-C++?) those tests otherwise are. It also makes me wonder if o

Re: Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Jan Hubicka
> On Thu, 18 Jul 2019, Jan Hubicka wrote: > > > Hi, > > this patch adjusts LTO tree merging to treat anonymous namespace types > > as local to a given TU, so just like !TREE_PUBLIC decls they are not > > merged (this is unify_scc change). This makes them to get different > > canonical types and ac

Re: Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Richard Biener
On Thu, 18 Jul 2019, Jan Hubicka wrote: > Hi, > this patch adjusts LTO tree merging to treat anonymous namespace types > as local to a given TU, so just like !TREE_PUBLIC decls they are not > merged (this is unify_scc change). This makes them to get different > canonical types and act as independe

Improve TBAA for types in anonymous namespaces

2019-07-18 Thread Jan Hubicka
Hi, this patch adjusts LTO tree merging to treat anonymous namespace types as local to a given TU, so just like !TREE_PUBLIC decls they are not merged (this is unify_scc change). This makes them to get different canonical types and act as independent types for TBAA. I also modified canonical type