[PATCH] Increase min-lto-partition.
Martin Liška
mliska@suse.cz
Fri Mar 13 14:25:34 GMT 2020
Hi.
I played a bit with -flinker-output=nolto-rel of gimple-match.ii and I identified
that current default of min-lto-partition leads to too many LTRANS. We pay with
LTO overhead and so that user time is high.
Base is:
$ g++ -O2 /tmp/gimple-match.ii -c -fno-checking -o x.o
real 0m40.130s
user 0m39.911s
LGEN:
$ time g++ -O2 /tmp/gimple-match.ii -c -flto -fno-checking
real 0m8.709s
user 0m8.543s
WPA+LTRANS:
$ time gcc -flto=auto -flinker-output=nolto-rel gimple-match.o -r -o gimple-match2.o --param lto-partitions=4 -fno-checking
real 0m11.220s
user 0m33.067s
$ time gcc -flto=auto -flinker-output=nolto-rel gimple-match.o -r -o gimple-match2.o --param lto-partitions=6 -fno-checking
real 0m9.880s
user 0m35.599s
$ time gcc -flto=auto -flinker-output=nolto-rel gimple-match.o -r -o gimple-match2.o --param lto-partitions=8 -fno-checking
real 0m6.681s
user 0m39.746s
default:
$ time gcc -flto=auto -flinker-output=nolto-rel gimple-match.o -r -o gimple-match2.o -fno-checking
real 0m6.065s
user 1m22.698s
So I would recommend to set the param value to 75000, which leads to 6 partitions. That would be:
9+10s = 19s vs. 40s (total real time 44s). That seems reasonable to me.
Thoughts?
Thanks,
Martin
gcc/ChangeLog:
2020-03-13 Martin Liska <mliska@suse.cz>
* params.opt: Bump min-lto-partition in order to not create
too many LTRANS.
---
gcc/params.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Increase-min-lto-partition.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200313/f22450cd/attachment.bin>
More information about the Gcc-patches
mailing list