Skip to content

[libclc] Append file_specific_compile_options after ARG_COMPILE_FLAGS #139871

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

Merged

Conversation

wenju-he
Copy link
Contributor

This enables file_specific_compile_options to take precedence over ARG_COMPILE_FLAGS. For example, if we add -fno-slp-vectorize to COMPILE_OPTIONS of a file, the behavior changes as follows:

  • Before this PR: -fno-slp-vectorize is overwritten by -O3, resulting in SLP vectorizer remaining enabled.
  • After this PR: -fno-slp-vectorize overwrites -O3, effectively disabling SLP vectorizer.

This enables file_specific_compile_options to take precedence over
ARG_COMPILE_FLAGS. For example, if we add -fno-slp-vectorize to
COMPILE_OPTIONS of a file, the behavior changes as follows:
* Before this PR: -fno-slp-vectorize is overwritten by -O3, resulting in
  SLP vectorizer remaining enabled.
* After this PR: -fno-slp-vectorize overwrites -O3, effectively
  disabling SLP vectorizer.
@wenju-he
Copy link
Contributor Author

@frasercrmck please help to review, thanks.

Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, good spot.

@wenju-he
Copy link
Contributor Author

@frasercrmck please help to merge, thanks

@frasercrmck
Copy link
Contributor

Sure, no problem. You can probably request commit access by now, though.

@frasercrmck frasercrmck merged commit d779b8f into llvm:main May 16, 2025
10 checks passed
@wenju-he wenju-he deleted the libclc-file_specific_compile_options branch May 16, 2025 09:23
@wenju-he
Copy link
Contributor Author

Sure, no problem. You can probably request commit access by now, though.

thanks @frasercrmck
I've requested at #140521, please help to review, thank you.

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

Successfully merging this pull request may close these issues.

2 participants