Add zstd support for LTO bytecode compression

Programming / Compilers / GCC - marxin [138bc75d-0d04-0410-961f-82ee72b054a4] - 3 July 2019 08:36 EDT

2019-07-03 Martin Liska

- 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.

3dcfd230121 Add zstd support for LTO bytecode compression.
gcc/ChangeLog | 24 ++++++++
gcc/Makefile.in | 4 +-
gcc/common.opt | 4 +-
gcc/config.in | 6 ++
gcc/configure | 163 ++++++++++++++++++++++++++++++++++++++++++++++++-
gcc/configure.ac | 66 ++++++++++++++++++++
gcc/doc/install.texi | 6 ++
gcc/gcc.c | 5 ++
gcc/lto-compress.c | 141 +++++++++++++++++++++++++++++++++++-------
gcc/lto-compress.h | 3 +-
gcc/lto-section-in.c | 2 +-
gcc/lto-streamer-out.c | 4 ++
gcc/timevar.def | 4 +-
13 files changed, 402 insertions(+), 30 deletions(-)

Upstream: gcc.gnu.org


  • Share