Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-04 Thread Jan Hubicka
> On 04/04/2014 04:05 PM, Jan Hubicka wrote: > >Ah, yes, it is what I was discussing this with Jason, but apparently the > >discussion died out. According to his comment __cxa_pure_virtual is a > >synonym for undefined behaviour so it may be correct to unconditionally > >devirtualize here (changin

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-04 Thread Jason Merrill
On 04/04/2014 04:05 PM, Jan Hubicka wrote: Ah, yes, it is what I was discussing this with Jason, but apparently the discussion died out. According to his comment __cxa_pure_virtual is a synonym for undefined behaviour so it may be correct to unconditionally devirtualize here (changing runtime be

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-04 Thread Jan Hubicka
> The third testcase uses anonymous namespaces and ipa-devirt correctly > reports that its list of possible targets is final, but even though > the list has only two items and one of them is __cxa_pure_virtual, it > still only devirtualizes speculatively. Ah, yes, it is what I was discussing this

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-04 Thread Martin Jambor
Hi, On Thu, Apr 03, 2014 at 11:19:10PM +0200, Jan Hubicka wrote: > > > > +/* If E does not lead to a thunk, simply redirect it to N. Otherwise > > > > create > > > > + one or more equivalent thunks for N and redirect E to the first in > > > > the > > > > + chain. */ > > > > + > > > > +void

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-03 Thread Jan Hubicka
> > > +/* If E does not lead to a thunk, simply redirect it to N. Otherwise > > > create > > > + one or more equivalent thunks for N and redirect E to the first in the > > > + chain. */ > > > + > > > +void > > > +redirect_edge_duplicating_thunks (struct cgraph_edge *e, struct > > > cgraph_n

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-01 Thread Martin Jambor
Hi, On Fri, Mar 28, 2014 at 09:43:53PM +0100, Jan Hubicka wrote: > > Hi, > > > > this patch fixes PR 60640 by creating thunks to clones when that is > > necessary to properly redirect edges to them. I mostly does what > > cgraph_add_thunk does and what analyze_function does to thunks. It > > fi

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-03-30 Thread Jan Hubicka
> Hi, > > this patch fixes PR 60640 by creating thunks to clones when that is > necessary to properly redirect edges to them. I mostly does what > cgraph_add_thunk does and what analyze_function does to thunks. It > fixes the testcases on trunk (it does not apply to 4.8, I have not > looked how

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-03-28 Thread Jan Hubicka
> Hi, > > this patch fixes PR 60640 by creating thunks to clones when that is > necessary to properly redirect edges to them. I mostly does what > cgraph_add_thunk does and what analyze_function does to thunks. It > fixes the testcases on trunk (it does not apply to 4.8, I have not > looked how