Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Qing Zhao via Gcc-patches
> On Oct 7, 2022, at 10:43 AM, Jan Hubicka wrote: > Probably not hard, and the IPA pass adjusting visbility could as well mark the functions as not to be inlined with -flive-patching=inline-only-static. >> >> OTOH inline-only-static could disable WPA inlining and

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Jan Hubicka via Gcc-patches
> >> Probably not hard, and the IPA pass adjusting visbility could as well > >> mark the functions > >> as not to be inlined with -flive-patching=inline-only-static. > >> > > OTOH inline-only-static could disable WPA inlining and do all inlining > early ... > >>> > >>>

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Qing Zhao via Gcc-patches
> On Oct 7, 2022, at 9:03 AM, Jan Hubicka wrote: > >>> WPA is Whole Program Analysis? >> >> Yes. >> >>> Okay, then It will promote all static function to extern functions. That’s >>> reasonable. >> >> No, all extern functions to static functions. >> >>> Is it hard to preserve the

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Martin Liška
On 10/7/22 15:04, Qing Zhao wrote: On Oct 7, 2022, at 2:34 AM, Richard Biener wrote: On Thu, Oct 6, 2022 at 3:18 PM Qing Zhao wrote: On Oct 6, 2022, at 4:29 AM, Richard Biener wrote: On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches wrote: On Oct 5, 2022, at 1:36 PM,

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Qing Zhao via Gcc-patches
> On Oct 7, 2022, at 2:34 AM, Richard Biener wrote: > > On Thu, Oct 6, 2022 at 3:18 PM Qing Zhao wrote: >> >> >> >>> On Oct 6, 2022, at 4:29 AM, Richard Biener >>> wrote: >>> >>> On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches >>> wrote: > On Oct 5, 2022,

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Jan Hubicka via Gcc-patches
> > WPA is Whole Program Analysis? > > Yes. > > > Okay, then It will promote all static function to extern functions. That’s > > reasonable. > > No, all extern functions to static functions. > > > Is it hard to preserve the original “static” visibility in the IR? > > Probably not hard, and

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-07 Thread Richard Biener via Gcc-patches
On Thu, Oct 6, 2022 at 3:18 PM Qing Zhao wrote: > > > > > On Oct 6, 2022, at 4:29 AM, Richard Biener > > wrote: > > > > On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches > > wrote: > >> > >> > >> > >>> On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: > >>> > >>> On 10/5/22 16:50, Qing

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-06 Thread Qing Zhao via Gcc-patches
> On Oct 6, 2022, at 4:29 AM, Richard Biener wrote: > > On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches > wrote: >> >> >> >>> On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: >>> >>> On 10/5/22 16:50, Qing Zhao wrote: I have two questions on this: >>> >>> Hello. >>>

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-06 Thread Martin Liška
On 10/6/22 10:29, Richard Biener wrote: > On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches > wrote: >> >> >> >>> On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: >>> >>> On 10/5/22 16:50, Qing Zhao wrote: I have two questions on this: >>> >>> Hello. >>> 1. What’s the

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-06 Thread Richard Biener via Gcc-patches
On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches wrote: > > > > > On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: > > > > On 10/5/22 16:50, Qing Zhao wrote: > >> I have two questions on this: > > > > Hello. > > > >> > >> 1. What’s the motivation to enable -flive-patching with -flto? Is

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-05 Thread Qing Zhao via Gcc-patches
> On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: > > On 10/5/22 16:50, Qing Zhao wrote: >> I have two questions on this: > > Hello. > >> >> 1. What’s the motivation to enable -flive-patching with -flto? Is there any >> application that will try -flive-patching with -flto now? > > We're

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-05 Thread Martin Liška
On 10/5/22 16:50, Qing Zhao wrote: > I have two questions on this: Hello. > > 1. What’s the motivation to enable -flive-patching with -flto? Is there any > application that will try -flive-patching with -flto now? We're planning supporting GCC LTO Linux kernel support, so that's one

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-05 Thread Qing Zhao via Gcc-patches
Hi, Martin: I have two questions on this: 1. What’s the motivation to enable -flive-patching with -flto? Is there any application that will try -flive-patching with -flto now? 2. Why only enable -flive-patching=inline-clone with -flto? thanks. Qing > On Oct 5, 2022, at 7:41 AM, Martin

[PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-05 Thread Martin Liška
There's no fundamental reason why -flive-patching=inline-clone can't coexist with -flto. Yes, one can theoretically have many more clone function that includes a live patch. It is pretty much the same as in-module inlining. Patch can bootstrap on x86_64-linux-gnu and survives regression tests.