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

[HLSL] Make HLSL 202x the default mode in Clang #108044

Closed
3 tasks
llvm-beanz opened this issue Sep 10, 2024 · 2 comments · Fixed by #108894
Closed
3 tasks

[HLSL] Make HLSL 202x the default mode in Clang #108044

llvm-beanz opened this issue Sep 10, 2024 · 2 comments · Fixed by #108894
Assignees
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' HLSL HLSL Language Support

Comments

@llvm-beanz
Copy link
Collaborator

llvm-beanz commented Sep 10, 2024

When we started working on HLSL in Clang we intended that HLSL 2021 would be Clang's target initial version. Things have changed since then, and we're now targeting HLSL 202x as the initial default version. This allows us to de-prioritize some legacy HLSL features that we'd prefer not to bring to Clang.

To support this the following changes should be made:

  • Fix the HLSL 202x mode (there are some tests which currently fail or behave differently under it)
  • Define HLSL 202y mode - [HLSL] Add HLSL 202y language mode #108437
  • Re-define older versions in LangStandards.def to match 202x, and emit a warning when using them
@llvm-beanz llvm-beanz converted this from a draft issue Sep 10, 2024
@github-actions github-actions bot added the clang Clang issues not falling into any other category label Sep 10, 2024
@llvm-beanz llvm-beanz added HLSL HLSL Language Support and removed clang Clang issues not falling into any other category labels Sep 10, 2024
@llvm-beanz llvm-beanz self-assigned this Sep 10, 2024
llvm-beanz added a commit that referenced this issue Sep 11, 2024
HLSL 202x inherits from C++11, which generates additional loop hint
information for loops that must progress. Since HLSL 202x is going to be
the default for Clang we want to make sure all our tests pass with it.

Required for #108044
@llvm-beanz
Copy link
Collaborator Author

PRs fixing broken test cases:

#108035
#108097
#108445

llvm-beanz added a commit to llvm-beanz/llvm-project that referenced this issue Sep 13, 2024
As captured in issue llvm#108044, HLSL 202x is the target language mode for
conformance for Clang. Earlier language modes will be a best effort and
prioritized after 2020x. To make this easier and reduce our testing
complexity we want to make 202x the default language mode now, and
align all earlier modes to match 202x (except where we explicitly
deviate).

This change has the following concrete changes:
* All older language modes gain `CPlusPlus11` as a base
* The default language mode for HLSL sources is changed to 202x
* A few test cases are updated to resolve differences in generated
diagnostics.

Fixes llvm#108044
llvm-beanz added a commit that referenced this issue Sep 16, 2024
As captured in issue #108044, HLSL 202x is the target language mode for
conformance for Clang. Earlier language modes will be a best effort and
prioritized after 2020x. To make this easier and reduce our testing
complexity we want to make 202x the default language mode now, and align
all earlier modes to match 202x (except where we explicitly deviate).

This change has the following concrete changes:
* All older language modes gain `CPlusPlus11` as a base
* The default language mode for HLSL sources is changed to 202x
* A few test cases are updated to resolve differences in generated
diagnostics.

Second to last change for  #108044
tmsri pushed a commit to tmsri/llvm-project that referenced this issue Sep 19, 2024
As captured in issue llvm#108044, HLSL 202x is the target language mode for
conformance for Clang. Earlier language modes will be a best effort and
prioritized after 2020x. To make this easier and reduce our testing
complexity we want to make 202x the default language mode now, and align
all earlier modes to match 202x (except where we explicitly deviate).

This change has the following concrete changes:
* All older language modes gain `CPlusPlus11` as a base
* The default language mode for HLSL sources is changed to 202x
* A few test cases are updated to resolve differences in generated
diagnostics.

Second to last change for  llvm#108044
@EugeneZelenko EugeneZelenko added the clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' label Sep 20, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 20, 2024

@llvm/issue-subscribers-clang-driver

Author: Chris B (llvm-beanz)

When we started working on HLSL in Clang we intended that HLSL 2021 would be Clang's target initial version. Things have changed since then, and we're now targeting HLSL 202x as the initial default version. This allows us to de-prioritize some legacy HLSL features that we'd prefer not to bring to Clang.

To support this the following changes should be made:

  • Fix the HLSL 202x mode (there are some tests which currently fail or behave differently under it)
  • Define HLSL 202y mode - [HLSL] Add HLSL 202y language mode #108437
  • Re-define older versions in LangStandards.def to match 202x, and emit a warning when using them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' HLSL HLSL Language Support
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants