[PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-20 Thread Martin Liška
Hello. I've got a patch candidate that leverages partial linking for a couple of selected object files. I'm sending make all-host- jX results for my machine: before: 3m18s (user 32m52s) https://gist.githubusercontent.com/marxin/223890df4d8d8e490b6b2918b77dacad/raw/1dd5eae5001295ba0230a689f7edc

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-20 Thread Richard Biener via Gcc
On Thu, May 20, 2021 at 2:34 PM Martin Liška wrote: > > Hello. > > I've got a patch candidate that leverages partial linking for a couple of > selected object files. > > I'm sending make all-host- jX results for my machine: > > before: 3m18s (user 32m52s) > https://gist.githubusercontent.com/marx

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-20 Thread Martin Liška
On 5/20/21 2:54 PM, Richard Biener wrote: So why did you go from applying this per-file to multiple files? When I did per-file for {gimple,generic}-match.c I hit the following issue with lto.priv symbols: /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: error: libbac

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-20 Thread Richard Biener via Gcc
On Thu, May 20, 2021 at 3:06 PM Martin Liška wrote: > > On 5/20/21 2:54 PM, Richard Biener wrote: > > So why did you go from applying this per-file to multiple files? > > When I did per-file for {gimple,generic}-match.c I hit the following issue > with lto.priv symbols: > > /usr/lib64/gcc/x86_64-

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-20 Thread Richard Biener via Gcc
On Thu, May 20, 2021 at 3:16 PM Richard Biener wrote: > > On Thu, May 20, 2021 at 3:06 PM Martin Liška wrote: > > > > On 5/20/21 2:54 PM, Richard Biener wrote: > > > So why did you go from applying this per-file to multiple files? > > > > When I did per-file for {gimple,generic}-match.c I hit the

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-20 Thread Jan Hubicka
> On Thu, May 20, 2021 at 3:16 PM Richard Biener > wrote: > > > > On Thu, May 20, 2021 at 3:06 PM Martin Liška wrote: > > > > > > On 5/20/21 2:54 PM, Richard Biener wrote: > > > > So why did you go from applying this per-file to multiple files? > > > > > > When I did per-file for {gimple,generic}

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-21 Thread Martin Liška
On 5/20/21 5:55 PM, Jan Hubicka wrote: Quick solution is to also modify partitioner to use the local symbol names when doing incremental linking (those mixing in source code and random seeds) to avoid clashes. Good hint. I added hash based on object file name (I don't want to handle proper stri

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-21 Thread Martin Liška
On 5/20/21 2:54 PM, Richard Biener wrote: On Thu, May 20, 2021 at 2:34 PM Martin Liška wrote: Hello. I've got a patch candidate that leverages partial linking for a couple of selected object files. I'm sending make all-host- jX results for my machine: before: 3m18s (user 32m52s) https://gi

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-21 Thread David Edelsohn via Gcc
On Fri, May 21, 2021 at 5:25 AM Martin Liška wrote: > > On 5/20/21 2:54 PM, Richard Biener wrote: > > On Thu, May 20, 2021 at 2:34 PM Martin Liška wrote: > >> > >> Hello. > >> > >> I've got a patch candidate that leverages partial linking for a couple of > >> selected object files. > >> > >> I'm

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-05-24 Thread Martin Liška
On 5/21/21 2:35 PM, David Edelsohn wrote: Please remember that not all targets support LTO so a fallback to a non-partial-LTO build needs to be provided and automatically invoked for those targets. Sure, for now it's definitely going to be a opt-in, enabled by something like: make PARTIAL_LTO=1

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-01 Thread Martin Liška
PING^1 On 5/21/21 10:29 AM, Martin Liška wrote: On 5/20/21 5:55 PM, Jan Hubicka wrote: Quick solution is to also modify partitioner to use the local symbol names when doing incremental linking (those mixing in source code and random seeds) to avoid clashes. Good hint. I added hash based on ob

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-01 Thread Martin Liška
@Richi: Can you please reply to this email? On 5/21/21 10:43 AM, Martin Liška wrote: On 5/20/21 2:54 PM, Richard Biener wrote: On Thu, May 20, 2021 at 2:34 PM Martin Liška wrote: Hello. I've got a patch candidate that leverages partial linking for a couple of selected object files. I'm se

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-01 Thread Richard Biener via Gcc
On Tue, Jun 1, 2021 at 9:33 AM Martin Liška wrote: > > @Richi: Can you please reply to this email? Not sure what I should add here? Honza suggested to mangle the promoted symbol names. I don't really like the idea to compile multiple TUs into one object. Also +LTO_LINKER_FLAGS = -flto=auto --

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-01 Thread Richard Biener via Gcc
On Tue, Jun 1, 2021 at 1:25 PM Martin Liška wrote: > > On 6/1/21 9:42 AM, Richard Biener wrote: > > On Tue, Jun 1, 2021 at 9:33 AM Martin Liška wrote: > >> > >> @Richi: Can you please reply to this email? > > > > Not sure what I should add here? Honza suggested to mangle the > > promoted symbol

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-01 Thread Martin Liška
On 6/1/21 9:42 AM, Richard Biener wrote: On Tue, Jun 1, 2021 at 9:33 AM Martin Liška wrote: @Richi: Can you please reply to this email? Not sure what I should add here? Honza suggested to mangle the promoted symbol names. Sure and I sent a patch for that. I don't really like the idea to

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-12 Thread Giuliano Belinassi via Gcc
Hi, all. Please CC me when I am mentioned into a mail. On Thu, 2021-05-20 at 15:16 +0200, Richard Biener via Gcc wrote: > On Thu, May 20, 2021 at 3:06 PM Martin Liška wrote: > > > > On 5/20/21 2:54 PM, Richard Biener wrote: > > > So why did you go from applying this per-file to multiple files?

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-06-23 Thread Martin Liška
On 5/21/21 10:29 AM, Martin Liška wrote: On 5/20/21 5:55 PM, Jan Hubicka wrote: Quick solution is to also modify partitioner to use the local symbol names when doing incremental linking (those mixing in source code and random seeds) to avoid clashes. Good hint. I added hash based on object fil

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-08-16 Thread Martin Liška
PING^2 @Honza: Can you please review the change? Martin On 6/23/21 3:53 PM, Martin Liška wrote: On 5/21/21 10:29 AM, Martin Liška wrote: On 5/20/21 5:55 PM, Jan Hubicka wrote: Quick solution is to also modify partitioner to use the local symbol names when doing incremental linking (those mix

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-08-20 Thread Martin Liška
On 8/16/21 3:58 PM, Martin Liška wrote: PING^2 @Honza: Can you please review the change? I've tested the patch and apparently it's not enough for {gimple,generic}-match.o not clashing in symbol names. Apparently there are more IPA clones that collide. Leaving that for now. Martin Martin

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-08-20 Thread Martin Liška
On 6/1/21 3:19 PM, Richard Biener wrote: On Tue, Jun 1, 2021 at 1:25 PM Martin Liška wrote: On 6/1/21 9:42 AM, Richard Biener wrote: On Tue, Jun 1, 2021 at 9:33 AM Martin Liška wrote: @Richi: Can you please reply to this email? Not sure what I should add here? Honza suggested to mangle

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-08-22 Thread Jan Hubicka
> Good hint. I added hash based on object file name (I don't want to handle > proper string escaping) and -frandom-seed. > > What do you think about the patch? Sorry for taking so long - I remember I was sending reply earlier but it seems I only wrote it and never sent. > Thanks, > Martin > From