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

2018-09-27 Thread Qing Zhao
> On Sep 27, 2018, at 3:58 AM, Jan Hubicka wrote: > >> >> Okay, I see. >> >>> >>> If you make this to be INTERPOSABLE (which means it can be replaced by >>> different >>> implementation by linker and that is probably what we want for live >>> patching) >>> then also inliner, ipa-sra and

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

2018-09-27 Thread Qing Zhao
> On Sep 27, 2018, at 2:45 AM, Richard Biener wrote: > > On Wed, 26 Sep 2018, Qing Zhao wrote: > >> >>> On Sep 26, 2018, at 6:07 PM, Alexander Monakov wrote: >>> >>> On Wed, 26 Sep 2018, Qing Zhao wrote: The request is for application developers who want to use gcc's online

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

2018-09-27 Thread Richard Biener
On Thu, 27 Sep 2018, Jan Hubicka wrote: > > 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 > > >

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

2018-09-27 Thread Jan Hubicka
> > Okay, I see. > > > > > If you make this to be INTERPOSABLE (which means it can be replaced by > > different > > implementation by linker and that is probably what we want for live > > patching) > > then also inliner, ipa-sra and other optimization will give up on these. > > do you

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

2018-09-27 Thread Jan Hubicka
> 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

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

2018-09-27 Thread Alexander Monakov
On Wed, 26 Sep 2018, Qing Zhao wrote: > I don’t think a -Os-like option will do the job. > > As Jeff already mentioned in a very previous email: > > “Presumably one of the cases where this capability is really helpful is > things like ksplice. If you have a function with global scope that has

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

2018-09-27 Thread Richard Biener
On Wed, 26 Sep 2018, Qing Zhao wrote: > > > On Sep 26, 2018, at 6:07 PM, Alexander Monakov wrote: > > > > 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

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 6:07 PM, Alexander Monakov wrote: > > 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 >>

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

2018-09-26 Thread Alexander Monakov
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

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 10:16 AM, Alexander Monakov wrote: > > On Wed, 26 Sep 2018, Qing Zhao wrote: > >> Alexander, >> >> thanks for the questions. >> >> Yes, we had some discussion on the questions you raised during the review of >> the initial patch back to 9/11/2018. >> please take a

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 12:16 PM, Jan Hubicka wrote: > >>> >>> On Sep 26, 2018, at 10:06 AM, Jan Hubicka wrote: >>> On Wed, Sep 26, 2018 at 10:45 AM, Jeff Law wrote: > On 9/26/18 7:38 AM, Jason Merrill wrote: >> On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener >> wrote:

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 12:16 PM, Jan Hubicka > wrote: > >>> >>> On Sep 26, 2018, at 10:06 AM, Jan Hubicka >> > wrote: >>> On Wed, Sep 26, 2018 at 10:45 AM, Jeff Law >>> > wrote: > On 9/26/18 7:38 AM, Jason Merrill

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 11:02 AM, Jan Hubicka wrote: > >>> Not sure >>> what 'internal' would mean in this context. >>> >>> But then the implementation looks at callee->externally_visible which >>> matches hidden visibility... externally_visible is probably not >>> the very best thing to look

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

2018-09-26 Thread Jan Hubicka
> > > On Sep 26, 2018, at 10:06 AM, Jan Hubicka wrote: > > > >> On Wed, Sep 26, 2018 at 10:45 AM, Jeff Law wrote: > >>> On 9/26/18 7:38 AM, Jason Merrill wrote: > On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener > wrote: > > IIRC he explicitely wanted 'static' not 'hidden'

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 10:06 AM, Jan Hubicka wrote: > >> On Wed, Sep 26, 2018 at 10:45 AM, Jeff Law wrote: >>> On 9/26/18 7:38 AM, Jason Merrill wrote: On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener wrote: > IIRC he explicitely wanted 'static' not 'hidden' linkage. Not sure >

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

2018-09-26 Thread Jan Hubicka
> > Not sure > > what 'internal' would mean in this context. > > > > But then the implementation looks at callee->externally_visible which > > matches hidden visibility... externally_visible is probably not > > the very best thing to look at depending on what we intend to do. > > from the

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 9:45 AM, Jeff Law wrote: > > On 9/26/18 7:38 AM, Jason Merrill wrote: >> On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener wrote: >>> IIRC he explicitely wanted 'static' not 'hidden' linkage. Not sure >>> what 'internal' would mean in this context. >> >> I mean internal

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

2018-09-26 Thread Qing Zhao
> On Sep 26, 2018, at 8:24 AM, Richard Biener wrote: > > On Wed, 26 Sep 2018, Jason Merrill wrote: > >> On Fri, Sep 21, 2018 at 11:12 AM, Qing Zhao wrote: >>> Hi, this is the 4th version of the patch. >>> >>> mainly address Martin’s comments on some spelling issues. >>> >>> I have tested

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

2018-09-26 Thread Alexander Monakov
On Wed, 26 Sep 2018, Qing Zhao wrote: > Alexander, > > thanks for the questions. > > Yes, we had some discussion on the questions you raised during the review of > the initial patch back to 9/11/2018. > please take a look at those discussions at: > >

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

2018-09-26 Thread Jan Hubicka
> On Wed, Sep 26, 2018 at 10:45 AM, Jeff Law wrote: > > On 9/26/18 7:38 AM, Jason Merrill wrote: > >> On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener wrote: > >>> IIRC he explicitely wanted 'static' not 'hidden' linkage. Not sure > >>> what 'internal' would mean in this context. > >> > >> I

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

2018-09-26 Thread Jason Merrill
On Wed, Sep 26, 2018 at 10:45 AM, Jeff Law wrote: > On 9/26/18 7:38 AM, Jason Merrill wrote: >> On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener wrote: >>> IIRC he explicitely wanted 'static' not 'hidden' linkage. Not sure >>> what 'internal' would mean in this context. >> >> I mean internal

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

2018-09-26 Thread Jeff Law
On 9/26/18 7:38 AM, Jason Merrill wrote: > On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener wrote: >> IIRC he explicitely wanted 'static' not 'hidden' linkage. Not sure >> what 'internal' would mean in this context. > > I mean internal linkage as in the C and C++ standards. Since this is

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

2018-09-26 Thread Qing Zhao
Alexander, thanks for the questions. Yes, we had some discussion on the questions you raised during the review of the initial patch back to 9/11/2018. please take a look at those discussions at: https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00549.html

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

2018-09-26 Thread Jason Merrill
On Wed, Sep 26, 2018 at 9:24 AM, Richard Biener wrote: > IIRC he explicitely wanted 'static' not 'hidden' linkage. Not sure > what 'internal' would mean in this context. I mean internal linkage as in the C and C++ standards. Jason

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

2018-09-26 Thread Richard Biener
On Wed, 26 Sep 2018, Jason Merrill wrote: > On Fri, Sep 21, 2018 at 11:12 AM, Qing Zhao wrote: > > Hi, this is the 4th version of the patch. > > > > mainly address Martin’s comments on some spelling issues. > > > > I have tested the patch on both x86 and aarch64, no issue. > > > > Okay for

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

2018-09-26 Thread Jason Merrill
On Fri, Sep 21, 2018 at 11:12 AM, Qing Zhao wrote: > Hi, this is the 4th version of the patch. > > mainly address Martin’s comments on some spelling issues. > > I have tested the patch on both x86 and aarch64, no issue. > > Okay for commit? > > thanks. > > Qing. > > gcc/ChangeLog > > +2018-09-20

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

2018-09-26 Thread Paolo Carlini
Hi, On 9/26/18 1:12 PM, Alexander Monakov wrote: On Fri, 21 Sep 2018, Qing Zhao wrote: +2018-09-20 Qing Zhao + + * cif-code.def (FUNCTION_EXTERN): New CIFCODE. + * common.opt (-finline-only-static): New option. + * doc/invoke.texi: Document -finline-only-static. + *

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

2018-09-26 Thread Alexander Monakov
On Fri, 21 Sep 2018, Qing Zhao wrote: > +2018-09-20 Qing Zhao > + > + * cif-code.def (FUNCTION_EXTERN): New CIFCODE. > + * common.opt (-finline-only-static): New option. > + * doc/invoke.texi: Document -finline-only-static. > + * ipa-inline.c (can_inline_edge_p): Control

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

2018-09-25 Thread Qing Zhao
Hi, I’d like to ping the following patch. https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01238.html Thanks. Qing

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

2018-09-21 Thread Qing Zhao
Hi, this is the 4th version of the patch. mainly address Martin’s comments on some spelling issues. I have tested the patch on both x86 and aarch64, no issue. Okay for commit? thanks. Qing. gcc/ChangeLog +2018-09-20 Qing Zhao + + * cif-code.def (FUNCTION_EXTERN): New CIFCODE. +