[llvm] [DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #114349)
Finn Plummer via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 16:48:30 PST 2024
================
@@ -294,6 +294,43 @@ class Attributes<Version ver = DXIL1_0, list<DXILAttribute> attrs> {
list<DXILAttribute> op_attrs = attrs;
}
+class DXILConstant<int value_> {
+ int value = value_;
+}
+
+defset list<DXILConstant> BarrierModes = {
----------------
inbelic wrote:
Following from here: https://github.com/llvm/llvm-project/pull/111884#discussion_r1813994789.
We could also do:
```
defvar BarrierMode_DeviceMemoryBarrier = 2;
...
defvar BarrierMode_AllMemoryBarrierWithGroupSync = 11;
```
without needing to define the `DXILConstant` class and the list. I suppose you no longer have the concreting grouping and scope of the definitions, but I think the potential simplicity it will give to the `Arg` class and hence `DXILEmitter`, would be worth it.
https://github.com/llvm/llvm-project/pull/114349
More information about the llvm-commits
mailing list