Re: RFA: PATCH to ipa-devirt for c++/58678

2014-09-10 Thread Jan Hubicka
> On 09/10/2014 06:47 PM, Jan Hubicka wrote: > >Again - I think main problem is that we provide a middle end a function body > >that it is not allowed to use. We do not really have a concept of function > >definitions that we may not use and worse yet, we are preventing that just in > >one special

Re: RFA: PATCH to ipa-devirt for c++/58678

2014-09-10 Thread Jason Merrill
On 09/10/2014 06:47 PM, Jan Hubicka wrote: Again - I think main problem is that we provide a middle end a function body that it is not allowed to use. We do not really have a concept of function definitions that we may not use and worse yet, we are preventing that just in one special case - i.e.

Re: RFA: PATCH to ipa-devirt for c++/58678

2014-09-10 Thread Jan Hubicka
Hi and forgot to add, I can implement the change if it seems to make sense to you ;) Honza

Re: RFA: PATCH to ipa-devirt for c++/58678

2014-09-10 Thread Jan Hubicka
> The failure with -flto is due to make_decl_local clearing > DECL_COMDAT, so the check in ipa_devirt allows devirtualization to > an implicitly declared destructor. It's not clear to me why > make_decl_local needs to clear DECL_COMDAT, but it's simpler to just > remove that check from ipa_devirt.

RFA: PATCH to ipa-devirt for c++/58678

2014-09-10 Thread Jason Merrill
The failure with -flto is due to make_decl_local clearing DECL_COMDAT, so the check in ipa_devirt allows devirtualization to an implicitly declared destructor. It's not clear to me why make_decl_local needs to clear DECL_COMDAT, but it's simpler to just remove that check from ipa_devirt. Tes