@@ -423,9 +423,15 @@ def ROCDLGlobalBuffer : LLVM_PointerInAddressSpace<1>;
423423def ROCDLBufferLDS : LLVM_PointerInAddressSpace<3>;
424424
425425class ROCDL_LDS_Read_Tr_IntrOp<string mnemonic> :
426- ROCDL_IntrOp<mnemonic, [1], [], [], 1>,
427- Arguments<(ins Arg<ROCDLBufferLDS, "", [MemRead]>:$ptr)>{
426+ ROCDL_IntrOp<mnemonic, [1], [], [], 1, 0, 1> {
427+ dag args = (ins Arg<ROCDLBufferLDS, "", [MemRead]>:$ptr);
428+ let arguments = !con(args, aliasAttrs);
428429 let assemblyFormat = "$ptr attr-dict `:` type($ptr) `->` type($res)";
430+ let extraClassDefinition = [{
431+ ::llvm::SmallVector<::mlir::Value> $cppClass::getAccessedOperands() {
432+ return {getPtr()};
433+ }
434+ }];
429435}
430436
431437def ROCDL_ds_read_tr4_b64 : ROCDL_LDS_Read_Tr_IntrOp<"ds.read.tr4.b64">;
@@ -437,13 +443,19 @@ def ROCDL_ds_read_tr16_b64 : ROCDL_LDS_Read_Tr_IntrOp<"ds.read.tr16.b64">;
437443// Global load to LDS intrinsic (available in GFX950)
438444
439445def ROCDL_GlobalLoadLDSOp :
440- ROCDL_IntrOp<"global.load.lds", [], [], [], 0>,
441- Arguments< (ins Arg<ROCDLGlobalBuffer, "", [MemRead]>:$globalPtr,
446+ ROCDL_IntrOp<"global.load.lds", [], [], [], 0, 0, 1> {
447+ dag args = (ins Arg<ROCDLGlobalBuffer, "", [MemRead]>:$globalPtr,
442448 Arg<ROCDLBufferLDS, "", [MemWrite]>:$ldsPtr,
443449 I32:$size,
444450 I32:$offset,
445- I32:$aux)> {
451+ I32:$aux);
452+ let arguments = !con(args, aliasAttrs);
446453 let assemblyFormat = "operands attr-dict";
454+ let extraClassDefinition = [{
455+ ::llvm::SmallVector<::mlir::Value> $cppClass::getAccessedOperands() {
456+ return {getGlobalPtr(), getLdsPtr()};
457+ }
458+ }];
447459}
448460
449461//===---------------------------------------------------------------------===//
0 commit comments