-
Notifications
You must be signed in to change notification settings - Fork 253
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
Deduplicate witness table while specializing generic functions #6363
base: master
Are you sure you want to change the base?
Deduplicate witness table while specializing generic functions #6363
Conversation
30a393e
to
fa32e98
Compare
I created an issue for this PR: |
fa32e98
to
0ba6c28
Compare
The latest change on this PR removes the duplicated witness table while specializing the generics. |
9cd57c5
to
f9f9ea7
Compare
I made changes as suggested. |
From a quick inspection with LLM, it appears that the decorations need to be handled properly. |
This commit is to experiment the idea of what would happen if we deduplicate the witness table based only on its type and its first operand. It turned out that it causes a crash, because it doesn't carry the decorations and childs properly. It means we need to also consider them as well as its type and its first operand. But if we do, we cannot deduplicate anything. It seems that this is not the right place to apply the deduplication.
31829d4
to
9dbbcdf
Compare
It appears the the witness-table-entry as the children are same when the type and concrete type are same. |
This commit fixes an issue that Slang sometimes emits duplicated DiffPair_XX structs when targeting HLSL.
This fix is required for upgrading DXC version from 1.7 to 1.9. With DXC 1.7, it had been fine even with the duplicated structs as long as their member variables are identical. But with DXC 1.9, it causes a compile error.
Closes #6364