This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make ipa-icf to not prevent devirtualization


> On Fri, Jan 15, 2016 at 12:01 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > this patch avoid ipa-icf to take away body of a virtual function which is a subject
> > of later devirtualization.
> 
> But isn't can_remove_if_no_direct_alls_p () supposed to return false
> then?  (depending
> on cgraph state)

No, can_remove_if_no_direct_calls_p returns true if you can remove the body after
you eliminate all calls (as the name is supposed to suggest).

For the virtual function in question this is satisfied, but unfortunately in ICF
case makes us to miss optimization for no very good reason.  it is indeed quite bit
more subtle than I would like to.  Changing the predicate itself will however make
inliner to inline those functions less agressively which is not very desired either.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]