[Draft] Rewrite output parameters#5249
Draft
llvm-beanz wants to merge 3 commits into
Draft
Conversation
This change is a huge swath of changes rewriting how HLSL represents pointers, references and arrays as well as the handling of output parameters in function signatures. The main changes included in this PR are: * Restoring Array->Pointer Decay in the HLSL ASTs. * Representing all output parameters using reference types in the AST. * Adding a new HLSLOutParamExpr AST node for output parameters. *Adding a new HLSLArrayTemporaryExpr to represent temporary array values. There are also a large number of associated fixes and patches to make the code generation and optimization code resilient to the new AST and IR structures that are generated.
Collaborator
Author
|
For more information on the changes contained here see: Revising HLSL |
|
❌ Build DirectXShaderCompiler 1.0.3260 failed (commit 9c93ab218e by @llvm-beanz) |
s-perron
reviewed
Jun 20, 2023
s-perron
left a comment
Collaborator
There was a problem hiding this comment.
I took a look at the SPIR-V changes, and nothing looks like it should be a problem.
Collaborator
|
I'll take a look at the failing spir-v test to make sure the newly generated spir-v makes sense. |
Collaborator
|
Some of the failing tests are real problems that need to be fixed:
I still have to look at ~30 more failing test cases. |
Collaborator
|
This was referenced Jun 28, 2023
This was referenced Jun 29, 2023
This was referenced Aug 7, 2023
Collaborator
Author
|
Related to #2419 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is a huge swath of changes rewriting how HLSL represents pointers, references and arrays as well as the handling of output parameters in function signatures.
The main changes included in this PR are:
There are also a large number of associated fixes and patches to make the code generation and optimization code resilient to the new AST and IR structures that are generated.
Disclaimer: This is a massive PR with no good way to break it up. In the current state there are still some test failures that I need to resolve, but I want to get this in front of people to review before it gets any bigger.
Fixes #5377