error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2' and 'XXH3_accumulate_sse2' #943

Closed
opened 2024-05-19 09:54:33 -05:00 by Hendricks266 · 7 comments
Hendricks266 commented 2024-05-19 09:54:33 -05:00 (Migrated from github.com)

When building e9455b2c20 with GCC 14.1 under MSYS2/MinGW64 using -Og -msse -msse2, I get the following errors.

$ gcc -Og -msse -msse2 -c xxhash.c -o xxhash.o
In file included from xxhash.c:42:
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5,
    inlined from 'XXH3_hashLong_64b_default' at xxhash.h:5951:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5,
    inlined from 'XXH3_hashLong_64b_withSecret' at xxhash.h:5937:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5,
    inlined from 'XXH3_hashLong_64b_withSeed_internal' at xxhash.h:5974:16,
    inlined from 'XXH3_hashLong_64b_withSeed' at xxhash.h:5993:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5,
    inlined from 'XXH3_hashLong_64b_withSeed_internal' at xxhash.h:5980:16,
    inlined from 'XXH3_hashLong_64b_withSeed' at xxhash.h:5993:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5,
    inlined from 'XXH3_hashLong_128b_default' at xxhash.h:6758:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5,
    inlined from 'XXH3_hashLong_128b_withSecret' at xxhash.h:6775:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5,
    inlined from 'XXH3_hashLong_128b_withSeed_internal' at xxhash.h:6787:16,
    inlined from 'XXH3_hashLong_128b_withSeed' at xxhash.h:6805:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'XXH3_hashLong_internal_loop',
    inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5,
    inlined from 'XXH3_hashLong_128b_withSeed_internal' at xxhash.h:6792:16,
    inlined from 'XXH3_hashLong_128b_withSeed' at xxhash.h:6805:12:
xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining
 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
xxhash.h:5853:9: note: called from here
 5853 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5852:9: note: called from here
 5852 |         f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining
 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \
      | ^~~~~~~~~~~~~~~~
xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE'
 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
xxhash.h:5860:9: note: called from here
 5860 |         f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ gcc --version
gcc.exe (Rev3, Built by MSYS2 project) 14.1.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
When building e9455b2c204df00f31200392f96ac12197de8bf0 with GCC 14.1 under MSYS2/MinGW64 using `-Og -msse -msse2`, I get the following errors. ``` $ gcc -Og -msse -msse2 -c xxhash.c -o xxhash.o In file included from xxhash.c:42: In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5, inlined from 'XXH3_hashLong_64b_default' at xxhash.h:5951:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5, inlined from 'XXH3_hashLong_64b_withSecret' at xxhash.h:5937:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5, inlined from 'XXH3_hashLong_64b_withSeed_internal' at xxhash.h:5974:16, inlined from 'XXH3_hashLong_64b_withSeed' at xxhash.h:5993:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_64b_internal' at xxhash.h:5915:5, inlined from 'XXH3_hashLong_64b_withSeed_internal' at xxhash.h:5980:16, inlined from 'XXH3_hashLong_64b_withSeed' at xxhash.h:5993:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5, inlined from 'XXH3_hashLong_128b_default' at xxhash.h:6758:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5, inlined from 'XXH3_hashLong_128b_withSecret' at xxhash.h:6775:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5, inlined from 'XXH3_hashLong_128b_withSeed_internal' at xxhash.h:6787:16, inlined from 'XXH3_hashLong_128b_withSeed' at xxhash.h:6805:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'XXH3_hashLong_internal_loop', inlined from 'XXH3_hashLong_128b_internal' at xxhash.h:6732:5, inlined from 'XXH3_hashLong_128b_withSeed_internal' at xxhash.h:6792:16, inlined from 'XXH3_hashLong_128b_withSeed' at xxhash.h:6805:12: xxhash.h:5130:1: error: inlining failed in call to 'always_inline' 'XXH3_scrambleAcc_sse2': function not considered for inlining 5130 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) | ^~~~~~~~~~~~~~~~~~~~~ xxhash.h:5853:9: note: called from here 5853 | f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5852:9: note: called from here 5852 | f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:4816:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_sse2': function not considered for inlining 4816 | XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ | ^~~~~~~~~~~~~~~~ xxhash.h:5127:34: note: in expansion of macro 'XXH3_ACCUMULATE_TEMPLATE' 5127 | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) | ^~~~~~~~~~~~~~~~~~~~~~~~ xxhash.h:5860:9: note: called from here 5860 | f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ``` $ gcc --version gcc.exe (Rev3, Built by MSYS2 project) 14.1.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ```
Caoos5194 commented 2024-05-20 03:18:43 -05:00 (Migrated from github.com)

$ gcc --version
gcc.exe (Rev3, Built by MSYS2 project) 14.1.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc --version gcc.exe (Rev3, Built by MSYS2 project) 14.1.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
axelf4 commented 2024-05-23 15:09:07 -05:00 (Migrated from github.com)

I worked around this by defining XXH_NO_INLINE_HINTS in debug builds.

I worked around this by defining `XXH_NO_INLINE_HINTS` in debug builds.
Cyan4973 commented 2024-12-08 02:13:40 -06:00 (Migrated from github.com)

This issue seems specific to the -Og compilation flag.
It also looks strikingly similar to #800.

This issue was supposed to be fixed by #804 (@easyaspi314),
but unfortunately, I can also reproduce it on MinGW64, currently employing gcc v14.2.

The surprising part if that a -Og test is part of test-all now (@t-mat),
and it is rigorously run at every commit on Github Actions.

Checking on my local Ubuntu test system, -Og seems to work fine with the exact command line provided above.
But note that, by default, Ubuntu 24.04 uses gcc-13.
gcc-11, gcc-12 and gcc-13 all work fine, but forcing usage of gcc-14, the same issue as MinGW64 becomes visible.

Unfortunately, Github Actions cannot run gcc-14 in the linux test, because the latest os version available there is 22.04,
and gcc-14 is not available on this version.

There is also a MinGW64 test run on Github Actions, but it's simpler, and doesn't include the -Og test.

This issue seems specific to the `-Og` compilation flag. It also looks strikingly similar to #800. This issue was supposed to be fixed by #804 (@easyaspi314), but unfortunately, I can also reproduce it on `MinGW64`, currently employing `gcc` `v14.2`. The surprising part if that a `-Og` test is part of `test-all` now (@t-mat), and it is rigorously run at every commit on Github Actions. Checking on my local Ubuntu test system, `-Og` seems to work fine with the exact command line provided above. But note that, by default, Ubuntu 24.04 uses `gcc-13`. `gcc-11`, `gcc-12` and `gcc-13` all work fine, but forcing usage of `gcc-14`, the same issue as `MinGW64` becomes visible. Unfortunately, Github Actions cannot run `gcc-14` in the linux test, because the latest `os` version available there is `22.04`, and `gcc-14` is not available on this version. There is also a `MinGW64` test run on Github Actions, but it's simpler, and doesn't include the `-Og` test.
Cyan4973 commented 2024-12-08 13:26:16 -06:00 (Migrated from github.com)

Just added a -Og test on our MinGW CI tests in #983,
and they fail, as expected.

Now onto the more difficult exercise of understanding why the compilation failure happens and how to fix that....

edit : as mentioned above by @axelf4 , and also previously on https://github.com/Cyan4973/xxHash/issues/800#issuecomment-1435801892, defining XXH_NO_INLINE_HINTS as a preprocessor build macro is a valid solution for -Og to compile properly.
Now the question is, is it the proper way to get -Og to compile, or should the source code be modified (and how) ?

I think it's a question of practicity. Defining XXH_NO_INLINE_HINTS is a manual operation, and most users will miss it and not know about it, even if documented (though "most users" won't compile with -Og either). So, to avoid the back and forth on Github Issues, it would be better if the source code takes care of it automatically.
But is that possible ? It's unclear. A big issue is that -Og doesn't signal itself at compilation time, so the code cannot adjust to this compilation flag (otherwise, it would have been easy to just enable XXH_NO_INLINE_HINTS on detection of -Og). Prior fix attempts show that interactions are complex with other compilation mode. It would be a pity to negatively impact general performance just to get -Og to compile fine on gcc-14.

Just added a `-Og` test on our `MinGW` CI tests in #983, and they fail, as expected. Now onto the more difficult exercise of understanding why the compilation failure happens and how to fix that.... _edit_ : as mentioned above by @axelf4 , and also previously on https://github.com/Cyan4973/xxHash/issues/800#issuecomment-1435801892, defining `XXH_NO_INLINE_HINTS` as a preprocessor build macro is a valid solution for `-Og` to compile properly. Now the question is, is it _the_ proper way to get `-Og` to compile, or should the source code be modified (and how) ? I think it's a question of practicity. Defining `XXH_NO_INLINE_HINTS` is a manual operation, and most users will miss it and not know about it, even if [documented](https://github.com/Cyan4973/xxHash?tab=readme-ov-file#binary-size-control) (though "most users" won't compile with `-Og` either). So, to avoid the back and forth on Github Issues, it would be better if the source code takes care of it automatically. But is that possible ? It's unclear. A big issue is that `-Og` doesn't signal itself at compilation time, so the code cannot adjust to this compilation flag (otherwise, it would have been easy to just enable `XXH_NO_INLINE_HINTS` on detection of `-Og`). Prior fix attempts show that interactions are complex with other compilation mode. It would be a pity to negatively impact general performance just to get `-Og` to compile fine on `gcc-14`.
Cyan4973 commented 2024-12-08 16:26:45 -06:00 (Migrated from github.com)

It's interesting to note that, while -Og -msse2 fails inlining,
the equivalent -Og -mavx2 doesn't.

I looked at the code, in case there would be some difference explaining this outcome, but there isn't any.

The current speculation is that a certain amount of loop unrolling is happening within these functions.
Because avx2 can essentially ingest 2x more data per round, it has 2x less loops.
This results in less code, possibly remaining under a certain inlining threshold, defined by -Og,
thus completing inlining successfully for avx2.

This assumption implies that the situation for -mavx512f should be even better,
but not completely, because -Og -mavx512f failed inlining,
though in a different function XXH3_initCustomSecret_avx512() and for a different reason.

Note that defining the build macro XXH_NO_INLINE_HINTS at compilation time works fine for avx512 too.

It's interesting to note that, while `-Og -msse2` fails inlining, the equivalent `-Og -mavx2` doesn't. I looked at the code, in case there would be some difference explaining this outcome, but there isn't any. The current speculation is that a certain amount of loop unrolling is happening within these functions. Because `avx2` can essentially ingest 2x more data per round, it has 2x less loops. This results in less code, possibly remaining under a certain inlining threshold, defined by `-Og`, thus completing inlining successfully for `avx2`. This assumption implies that the situation for `-mavx512f` should be even better, but not completely, because `-Og -mavx512f` failed inlining, though in a different function `XXH3_initCustomSecret_avx512()` and for a different reason. Note that defining the build macro `XXH_NO_INLINE_HINTS` at compilation time works fine for `avx512` too.
Cyan4973 commented 2024-12-26 18:59:47 -06:00 (Migrated from github.com)

The -Og compilation issue proves to be intractable on some compiler versions,
and the only thing I can suggest at this point is to recommend using XXH_NO_INLINE_HINTS when compiling with -Og and document it.

The `-Og` compilation issue proves to be intractable on some compiler versions, and the only thing I can suggest at this point is to recommend using `XXH_NO_INLINE_HINTS` when compiling with `-Og` and document it.
Hendricks266 commented 2024-12-26 21:00:42 -06:00 (Migrated from github.com)

Thanks. We did something similar: github.com/nukeykt/NBlood@4f58b06b5f

Thanks. We did something similar: https://github.com/nukeykt/NBlood/commit/4f58b06b5f0ef3fb25bfc1ea391ce6c4d3b031ea
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Cyan4973/xxHash#943
No description provided.