Repository navigation
[Draft] Rewrite output parameters - #5249
Chris B (llvm-beanz) wants to merge 3 commits into
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.
|
For more information on the changes contained here see: Revising HLSL |
Steven Perron (s-perron)
left a comment
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.
|
I'll take a look at the failing spir-v test to make sure the newly generated spir-v makes sense. |
|
Some of the failing tests are real problems that need to be fixed:
I still have to look at ~30 more failing test cases. |
|
|
Related to #2419 |
|
Chris B (@llvm-beanz) are you still interested in this? It's quite old and still marked as draft. |
I have very mixed feelings about this. The branch was useful in that it proved out the design we ultimately used in Clang for implementing parameter passing. I don't really know how to gain enough confidence in the correctness of a change this large to actually land it. I don't feel like the HLSL testing we have available to us is sufficient to give confidence. The change would be a big win though. It fixes warning diagnostics, codegen bugs, and removes a ton of code that never needed to exist. I may try to get creative about how we could test this and see what I can come up with. |
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