Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Jan Hubicka
> On Mon, 1 Oct 2018, Jan Hubicka wrote: > > > > > I see. So one possible canonicalization is to make _all_ > > > > pointer-typed FIELD_DECLs point to incomplete variants since the memory > > > > accesses should already have the "proper" access types. Can you > > > > get statistics on that? Not

Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Richard Biener
On Mon, 1 Oct 2018, Jan Hubicka wrote: > > > I see. So one possible canonicalization is to make _all_ > > > pointer-typed FIELD_DECLs point to incomplete variants since the memory > > > accesses should already have the "proper" access types. Can you > > > get statistics on that? Not sure how to

Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Jan Hubicka
> > I see. So one possible canonicalization is to make _all_ > > pointer-typed FIELD_DECLs point to incomplete variants since the memory > > accesses should already have the "proper" access types. Can you > > get statistics on that? Not sure how to get an "incomplete" type > > though (iff we can

Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Richard Biener
On Mon, 1 Oct 2018, Richard Biener wrote: > On Mon, 1 Oct 2018, Jan Hubicka wrote: > > > > > > > The ODR savings really look good but as you say the implementation is > > > somewhat "tricky". > > > > > > I'd like to see the type-variant done separately (of course) and > > > also differently. T

Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Richard Biener
On Mon, 1 Oct 2018, Jan Hubicka wrote: > > > > The ODR savings really look good but as you say the implementation is > > somewhat "tricky". > > > > I'd like to see the type-variant done separately (of course) and > > also differently. This is because when enabling > > free-lang-data by default

Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Jan Hubicka
> > The ODR savings really look good but as you say the implementation is > somewhat "tricky". > > I'd like to see the type-variant done separately (of course) and > also differently. This is because when enabling > free-lang-data by default we should be able to get benefits for > non-LTO compi

Re: RFC: variant and ODR based type merging during LTO streaming

2018-10-01 Thread Richard Biener
On Fri, 28 Sep 2018, Jan Hubicka wrote: > Hi, > this is a proof-of-concept patch for type merging during LTO streaming. It > does two things > 1) replace type variant by first compatible one in TYPE_NEXT_VARIANT list >This is useful at compilation time because frontends produce more variants >