> Hi, > > On Mon, Nov 04 2019, Jan Hubicka wrote: > > Hi, > > I am not really pround of this implementation (and will think of better > > interface), but this patch saves about 10% of WPA time by avoiding > > unnecesary invalidations of the polymorphic call target hash during > > inlining. > > > > ipa-devirt register node removal hook to invalidate cache when one of > > functions in it gets removed. Now inliner often decides to inline into > > a thunk. In order to get costs right it turns the thunk into a gimple > > functions and re-inserts it into the summaries (so the summaries gets > > computed for the actual thunk body). > > > > Bootstrapped/regtested x86_64-linux, comitted. > > > > * ipa-inline-transform.c: Include ipa-utils.h > > (inline_call): Set thunk_expansion flag. > > * ipa-utils.h (thunk_expansion): Declare. > > * ipa-devirt.c (thunk_expansion): New global var. > > (devirt_node_removal_hook): Do not invalidate cache while > > doing thunk expansion. > > ... > > > Index: ipa-utils.h > > =================================================================== > > --- ipa-utils.h (revision 277780) > > +++ ipa-utils.h (working copy) > > @@ -47,6 +47,9 @@ void ipa_merge_profiles (struct cgraph_n > > struct cgraph_node *src, bool preserve_body = false); > > bool recursive_call_p (tree, tree); > > > > +/* In ipa-prop.c */ > > +void ipa_remove_useless_jump_functions (); > > + > > This is probably an unintended change? Can I remove it?
Indeed, it is unrelated change. Thanks for noticing it! Honza > > Martin >