-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libclc] Remove __attribute__((always_inline)) #158791
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
Conversation
Some built-ins miss alwaysinline attribute due to the typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a widespread typo where _CLC_DECL is incorrectly used instead of _CLC_DEF for function definitions in libclc, causing some built-ins to miss the alwaysinline attribute.
- Replaces
_CLC_DECLwith_CLC_DEFin function definitions across multiple files - Ensures proper inline attributes are applied to OpenCL C library functions
- Affects math helpers, atomic operations, and shuffle functions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libclc/clc/lib/generic/math/clc_sincos_helpers.inc | Fixed macro for tangent helper function definition |
| libclc/clc/lib/generic/atomic/clc_atomic_def.inc | Fixed macros for atomic operation function definitions |
| libclc/clc/lib/generic/atomic/clc_atomic_compare_exchange.inc | Fixed macros for atomic compare exchange function definitions |
| libclc/clc/include/clc/misc/shuffle_def.inc | Fixed macros for shuffle function definitions |
| libclc/clc/include/clc/misc/shuffle2_def.inc | Fixed macros for shuffle2 function definitions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all the always_inline attributes should be removed, That's a good bug
done, thanks.
|
|
This is causing test failures for me: |
always_inline doesn't guarantee performance improvement.
Target-specific optimizations decide whether inlining is profitable.
Changes to amdgcn--amdhsa.bc:
Also replace typo _CLC_DECL with _CLC_DEF for function definition.