It is no longer necessary to get good performance, there is only a small speed difference between -O2 and -O3, so just stick to the default of -O2. I've measured neutral compression speed and a ~3% decompression speed loss in userspace with clang & gcc. I've also measured neutral compression speed and a ~1% decompression speed loss in the kernel benchmarks. This also fixes the stack space usage on parisc. The compiler was buggy for -O3 and used ~3KB of stack space for several functions. With -O2 the problem is completely resolved, and stack space is back to a few hundred bytes. Additionally, we get a large code size win on gcc: | Compiler | Before (Bytes) | After (Bytes) | Delta (Bytes) | |----------|----------------|---------------|---------------| | gcc-11 | 952754 | 738954 | -213800 | | clang-12 | 976290 | 938826 | -37464 |
48 lines
1.5 KiB
Makefile
48 lines
1.5 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
|
# ################################################################
|
|
# Copyright (c) Facebook, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under both the BSD-style license (found in the
|
|
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
# in the COPYING file in the root directory of this source tree).
|
|
# You may select, at your option, one of the above-listed licenses.
|
|
# ################################################################
|
|
obj-$(CONFIG_ZSTD_COMPRESS) += zstd_compress.o
|
|
obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd_decompress.o
|
|
|
|
ccflags-y += -Wno-error=deprecated-declarations
|
|
|
|
zstd_compress-y := \
|
|
zstd_compress_module.o \
|
|
common/debug.o \
|
|
common/entropy_common.o \
|
|
common/error_private.o \
|
|
common/fse_decompress.o \
|
|
common/zstd_common.o \
|
|
compress/fse_compress.o \
|
|
compress/hist.o \
|
|
compress/huf_compress.o \
|
|
compress/zstd_compress.o \
|
|
compress/zstd_compress_literals.o \
|
|
compress/zstd_compress_sequences.o \
|
|
compress/zstd_compress_superblock.o \
|
|
compress/zstd_double_fast.o \
|
|
compress/zstd_fast.o \
|
|
compress/zstd_lazy.o \
|
|
compress/zstd_ldm.o \
|
|
compress/zstd_opt.o \
|
|
|
|
zstd_decompress-y := \
|
|
zstd_decompress_module.o \
|
|
common/debug.o \
|
|
common/entropy_common.o \
|
|
common/error_private.o \
|
|
common/fse_decompress.o \
|
|
common/zstd_common.o \
|
|
decompress/huf_decompress.o \
|
|
decompress/huf_decompress_amd64.o \
|
|
decompress/zstd_ddict.o \
|
|
decompress/zstd_decompress.o \
|
|
decompress/zstd_decompress_block.o \
|