Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Hendricks266 opened this issue May 19, 2024 · 2 comments

Comments

@Hendricks266
Copy link

When building e9455b2 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
Copy link

$ 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
Copy link

axelf4 commented May 23, 2024

I worked around this by defining XXH_NO_INLINE_HINTS in debug builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants