[PATCH][Middle-end][Version 4]Add a new option to control inlining only on static functions

Jan Hubicka hubicka@ucw.cz
Thu Sep 27 08:58:00 GMT 2018


> On Wed, 26 Sep 2018, Qing Zhao wrote:
> > The request is for application developers who want to use gcc's online
> >    patching feature.
> > 
> > Today, developers can turn off inlining and deliver just the patched routine.  They
> >    can also allow all inlining and deliver the patched routine and all the routines
> >    that the patched routine was inlined into.
> > 
> > completely turning off inlining will sacrifice too much run-time performance. completely
> > enable inlining, on the other hand, will have the potential issues with code size, complexity and
> > debuggability for the online patching.
> > 
> > the proposed option provides a compromised solution for the above issues. and enable more
> > developers to utilize gcc’s online patching feature.
> 
> From this explanation it sounds to me that what you really need is -Os-like
> behavior for IPA passes, without enabling -Os for gimple/rtl passes, as I
> mentioned in my previous email. Honza, how does that sound?

How -Os is related? We will still do things like inlining or cloning of functions
if we expect code size to decrease (that may happen if arguments become dead)

Honza
> 
> > > If the original issue is that inlining duplicates code, wouldn't it be better
> > > solved by a switch that instructs inlining heuristics to inline as if for -Os,
> > > without enabling -Os for other passes?
> 
> Alexander



More information about the Gcc-patches mailing list