Cyan4973 / xxHash

Extremely fast non-cryptographic hash algorithm
http://www.xxhash.com/
Other
8.78k stars 766 forks source link

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

Open Hendricks266 opened 2 months ago

Hendricks266 commented 2 months ago

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 2 months ago

$ 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 2 months ago

I worked around this by defining XXH_NO_INLINE_HINTS in debug builds.