]> git.ipfire.org Git - thirdparty/gcc.git/commit
Cleanup LTO tag streaming.
authorJan Hubicka <jh@suse.cz>
Wed, 3 Jun 2020 10:03:40 +0000 (12:03 +0200)
committerJan Hubicka <jh@suse.cz>
Wed, 3 Jun 2020 10:10:22 +0000 (12:10 +0200)
commitdda71670514e88dcd9b913c44c0ee64d8c3d6da9
treebb9ec41f37986163716c4cf3d5a0d3a921c0767d
parent4fc2610a8301198367c590759a578b03167a1868
Cleanup LTO tag streaming.

this patch cleanups a bit the way LTO tags are assigned (so we do not use magic
numbers of 2) and reorders them approximately by their frequency so the stream
gets little bit smaller because of uleb coding.

From:

[WPA] Compression: 111213968 input bytes, 293801489 uncompressed bytes (ratio: 2.641768)
[WPA] Size of mmap'd section decls: 85983129 bytes
[WPA] Size of mmap'd section function_body: 14058627 bytes

to:

[WPA] Compression: 110593119 input bytes, 287696614 uncompressed bytes (ratio: 2.601397)
[WPA] Size of mmap'd section decls: 85628556 bytes
[WPA] Size of mmap'd section function_body: 13842928 bytes

lto-bootstrapped/regtested x86_64-linux, will commit it shortly.

* lto-streamer.h (LTO_tags): Reorder so frequent tags has small indexes;
add LTO_first_tree_tag and LTO_first_gimple_tag.
(lto_tag_is_tree_code_p): Update.
(lto_tag_is_gimple_code_p): Update.
(lto_gimple_code_to_tag): Update.
(lto_tag_to_gimple_code): Update.
(lto_tree_code_to_tag): Update.
(lto_tag_to_tree_code): Update.
gcc/lto-streamer.h