From bd0466350d20e2c6aab4c47668cd5486dc7a3d94 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Wed, 6 Jul 2022 14:43:44 +0200 Subject: Eliminate unused C DSP functions at compile time When compiling with asm enabled there's no point in compiling C versions of DSP functions that have asm implementations using instruction sets that the compiler can unconditionally use. E.g. when compiling with -mssse3 we can remove the C version of all functions with SSSE3 implementations. This is accomplished using the compiler's dead code elimination functionality. Can be configured using the new 'trim_dsp' meson option, which by default is enabled when compiling in release mode. --- meson_options.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meson_options.txt') diff --git a/meson_options.txt b/meson_options.txt index 94f3704..91a0f6c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -57,3 +57,9 @@ option('stack_alignment', option('xxhash_muxer', type : 'feature', value : 'auto') + +option('trim_dsp', + type: 'combo', + choices: ['true', 'false', 'if-release'], + value: 'if-release', + description: 'Eliminate redundant DSP functions where possible') -- cgit v1.2.3