[Mlir-commits] [mlir] [ROCDL] Added LDS barrier ops to ROCDL (gfx1250) (PR #171810)
Ravil Dorozhinskii
llvmlistbot at llvm.org
Thu Dec 11 08:43:24 PST 2025
================
@@ -1177,25 +1177,82 @@ def ROCDL_RawBufferAtomicCmpSwap :
// Memory prefetch intrinsics
def ROCDL_GlobalPrefetchOp :
- ROCDL_IntrOp<"global.prefetch", [], [], [], 0, 0, 0, 0, [1], ["scope"]>,
- Arguments<(ins Arg<LLVM_PointerInAddressSpace<1>, "", []>:$ptr, I32Attr:$scope)> {
+ ROCDL_IntrOp<"global.prefetch", [], [], [], 0, 0, 1, 0, [1], ["scope"]> {
+ dag args = (ins Arg<LLVM_PointerInAddressSpace<1>, "", [MemRead]>:$ptr,
+ I32Attr:$scope);
+ let arguments = !con(args, baseArgs);
let description = [{
Prefetches 1 byte of data per lane from global memory into the WGP-cache or L2-cache.
Available on gfx1250+.
}];
let results = (outs);
let assemblyFormat = "$ptr `,` `scope` $scope attr-dict `:` qualified(type($ptr))";
+ let extraClassDefinition = [{
+ SmallVector<Value> $cppClass::getAccessedOperands() {
----------------
ravil-mobile wrote:
> What determined this choice of a return type? Is it for some interface / templated code?
Yes. Here is the reference to the AliasAnalysisOpInterface interface:
https://github.com/llvm/llvm-project/blob/8a9d9e48535f937ea6aa24060c2242c3a57660ac/mlir/include/mlir/Dialect/LLVMIR/LLVMInterfaces.td#L288-L294
https://github.com/llvm/llvm-project/pull/171810
More information about the Mlir-commits
mailing list