diff options
author | Damjan Marion <damarion@cisco.com> | 2021-04-30 11:11:08 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2021-04-30 11:15:47 +0200 |
commit | 1bb67abf3c6816b6f2c22eaeb1bdc355c4c95a46 (patch) | |
tree | 2d30392d619affa3073bfc9d15151f71c7a4fc37 /src/vppinfra | |
parent | 600d7a85fbdd9f3c7c6977faa07fee7e2e13ce21 (diff) |
build: switch release build to -O3
Type: make
Change-Id: Ia39c2f847e7b4907fdd3fcac75897b8b4c545a65
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r-- | src/vppinfra/cpu.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h index 8d2465ba4d6..40857fb245b 100644 --- a/src/vppinfra/cpu.h +++ b/src/vppinfra/cpu.h @@ -45,12 +45,6 @@ typedef enum CLIB_MARCH_TYPE_N_VARIANTS } clib_march_variant_type_t; -#if __GNUC__ > 4 && !__clang__ && CLIB_DEBUG == 0 -#define CLIB_CPU_OPTIMIZED __attribute__ ((optimize ("O3"))) -#else -#define CLIB_CPU_OPTIMIZED -#endif - #ifdef CLIB_MARCH_VARIANT #define __CLIB_MULTIARCH_FN(a,b) a##_##b #define _CLIB_MULTIARCH_FN(a,b) __CLIB_MULTIARCH_FN(a,b) @@ -403,19 +397,18 @@ CLIB_MARCH_SFX(fn ## _march_constructor) (void) \ } \ #ifndef CLIB_MARCH_VARIANT -#define CLIB_MARCH_FN(fn, rtype, _args...) \ - static rtype CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (fn ## _ma)(_args); \ - rtype (*fn ## _selected) (_args) = & CLIB_MARCH_SFX (fn ## _ma); \ - int fn ## _selected_priority = 0; \ - static inline rtype CLIB_CPU_OPTIMIZED \ - CLIB_MARCH_SFX (fn ## _ma)(_args) +#define CLIB_MARCH_FN(fn, rtype, _args...) \ + static rtype CLIB_MARCH_SFX (fn##_ma) (_args); \ + rtype (*fn##_selected) (_args) = &CLIB_MARCH_SFX (fn##_ma); \ + int fn##_selected_priority = 0; \ + static inline rtype CLIB_MARCH_SFX (fn##_ma) (_args) #else -#define CLIB_MARCH_FN(fn, rtype, _args...) \ - static rtype CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (fn ## _ma)(_args); \ - extern rtype (*fn ## _selected) (_args); \ - extern int fn ## _selected_priority; \ - CLIB_MARCH_FN_CONSTRUCTOR (fn) \ - static rtype CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (fn ## _ma)(_args) +#define CLIB_MARCH_FN(fn, rtype, _args...) \ + static rtype CLIB_MARCH_SFX (fn##_ma) (_args); \ + extern rtype (*fn##_selected) (_args); \ + extern int fn##_selected_priority; \ + CLIB_MARCH_FN_CONSTRUCTOR (fn) \ + static rtype CLIB_MARCH_SFX (fn##_ma) (_args) #endif #define CLIB_MARCH_FN_SELECT(fn) (* fn ## _selected) |