-
Notifications
You must be signed in to change notification settings - Fork 786
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
Pb when building with gcc-12 -Og #720
Conversation
Fixes: | xxhash.h:3932:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_512_sse2': function not considered for inlining | 3932 | XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, | | ^~~~~~~~~~~~~~~~~~~~~~~~ | xxhash.h:4369:9: note: called from here | 4369 | f_acc512(acc, | | ^~~~~~~~~~~~~ | 4370 | in, | | ~~~ | 4371 | secret + n*XXH_SECRET_CONSUME_RATE); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Hi @Mingli-Yu, First of all, please understand that we can't accept your PR for now. Because your PR failed to pass our test. But I also must say that our test is not perfect. So feel free to point out our mistake. I failed to reproduce your issue with
|
Looks like @Mingli-Yu forgot to mention that the issue only shows up when using |
Hi @jrosdahl, thanks for the info!
Since I have no idea so far, I just put some random commands for further investigation.
|
Just to add another data point, I can also confirm this. I have been investigating a little bit on my end. |
I have fixed the meson build in mesonbuild/wrapdb#580, specifically mesonbuild/wrapdb@e9b59a6. I think this PR has to do something similar, but I am not going to touch it because I have no clue how to tell what optimization level the compiler is using in Makefiles. I haven't found a pure C preprocessor solution. I would seriously just recommend using Meson for xxhash though :). |
Indeed, Somehow,
At least, that's the situation with I don't have access to older versions of |
Hmm, this is a tricky one. GCC 12 doesn't seem to emit any different macros on gcc-mirror/gcc@c952126 might be the culprit The problem seems to be specifically -Og preventing GCC from inlining the accumulate functions because they are accessed through function pointers. My guess is to either disable force inline on the accumulate functions themselves or force GCC into -O3 mode if neither If we can get them to be inlined naturally (such as via |
I have also encountered this issue. Any workarounds except removing -Og from our compiler options? |
Using the Meson build will fix this issue if that is possible for you. |
Hi @eugeneko, please try the HEAD of Since #814 added CI test for You can also try it in your terminal
|
Fixed in #804 |
Fixes:
| xxhash.h:3932:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_512_sse2': function not considered for inlining
| 3932 | XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc,
| | ^~~~~~~~~~~~~~~~~~~~~~~~
| xxhash.h:4369:9: note: called from here
| 4369 | f_acc512(acc,
| | ^~~~~~~~~~~~~
| 4370 | in,
| | ~~~
| 4371 | secret + n*XXH_SECRET_CONSUME_RATE);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Mingli Yu mingli.yu@windriver.com