Add zstd support for LTO bytecode compression.
authorMartin Liska <mliska@suse.cz>
Wed, 3 Jul 2019 08:36:54 +0000 (10:36 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 3 Jul 2019 08:36:54 +0000 (08:36 +0000)
commit87741e51b53511bed2bd687dc48fe8578ae81d6c
treee230e0bcb2b3cceb4f9d73ecbd46d47f7fa7ffd0
parent88614dfa2bb5a40566bef00a85b13c4b167dc3c5
Add zstd support for LTO bytecode compression.

2019-07-03  Martin Liska  <mliska@suse.cz>

* Makefile.in: Define ZSTD_LIB.
* common.opt: Adjust compression level
to support also zstd levels.
* config.in: Regenerate.
* configure: Likewise.
* configure.ac: Add --with-zstd and --with-zstd-include options
and detect ZSTD.
* doc/install.texi: Mention zstd dependency.
* gcc.c: Print supported LTO compression algorithms.
* lto-compress.c (lto_normalized_zstd_level): Likewise.
(lto_compression_zstd): Likewise.
(lto_uncompression_zstd): Likewise.
(lto_end_compression): Dispatch in between zlib and zstd.
(lto_compression_zlib): Mark with ATTRIBUTE_UNUSED.
(lto_uncompression_zlib): Make it static.
* lto-compress.h (lto_end_uncompression): Fix GNU coding style.
* lto-section-in.c (lto_get_section_data): Pass info
about used compression.
* lto-streamer-out.c: By default use zstd when possible.
* timevar.def (TV_IPA_LTO_DECOMPRESS): Rename to decompression
(TV_IPA_LTO_COMPRESS): Likewise for compression.

From-SVN: r272996
13 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/common.opt
gcc/config.in
gcc/configure
gcc/configure.ac
gcc/doc/install.texi
gcc/gcc.c
gcc/lto-compress.c
gcc/lto-compress.h
gcc/lto-section-in.c
gcc/lto-streamer-out.c
gcc/timevar.def