-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic #111884
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
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9ccd907
Added GroupMemoryBarrierWithGroupSync intrinsic for DXIL
adam-yang 7782046
Changed naming convention and fixed formatting
adam-yang 259dedd
Got rid of the noduplicate attr
adam-yang 6b4c6f1
Shader model changed to 6.0
adam-yang 9aafe48
Fixed the incorrect arguments list
adam-yang 88b493e
Revert "Shader model changed to 6.0"
adam-yang 1ad58f3
Added another intermediate memory barrier intrinsic that maps directl…
adam-yang a4bd295
Format
adam-yang 8141a2a
Tablegen simple
adam-yang 4d1ba4b
All working now
adam-yang f44219d
Rename and clang-format
adam-yang 1c11859
Comment
adam-yang c5c5d75
Handling the arg select version for other ops
adam-yang 485e3a8
Formatting
adam-yang f13c3a9
Addressed feedback
adam-yang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
8 changes: 8 additions & 0 deletions
8
llvm/test/CodeGen/DirectX/group_memory_barrier_with_group_sync.ll
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefix=CHECK | ||
inbelic marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| define void @test_group_memory_barrier_with_group_sync() { | ||
| entry: | ||
| ; CHECK: call void @dx.op.barrier(i32 80, i32 9) | ||
| call void @llvm.dx.group.memory.barrier.with.group.sync() | ||
| ret void | ||
| } | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
DXILConstantadded out of necessity? Or can you dodefset list<int> BarrierModes ...?Was it added for better documentation/extensibility?
Otherwise, we could remove
indexfrom theArgclass and replace the theis...bits with a type enum to match theArgSelectstruct directly and I think it would allow for more concise code inDXILEmitter.cppThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. I don't think there's a way for definitions to be just a primitive type like int; it has to be instantiation of a class, which in turn has int members. I could be wrong though.