diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td --- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td +++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td @@ -129,12 +129,14 @@ // // %0 = alloclike(%m)[%s] : memref<8x?xf32, (d0, d1)[s0] -> ((d0 + s0), d1)> // -class AllocLikeOp traits = []> : +class AllocLikeOp resultDecorators = [], + list traits = []> : Std_Op { let arguments = (ins Variadic:$value, Confined, [IntMinValue<0>]>:$alignment); - let results = (outs AnyMemRef); + let results = (outs Arg); let builders = [OpBuilder< "Builder *builder, OperationState &result, MemRefType memrefType", [{ @@ -276,7 +278,7 @@ // AllocOp //===----------------------------------------------------------------------===// -def AllocOp : AllocLikeOp<"alloc"> { +def AllocOp : AllocLikeOp<"alloc", [MemAlloc], [MemoryEffects<[MemAlloc]>]> { let summary = "memory allocation operation"; let description = [{ The `alloc` operation allocates a region of memory, as specified by its @@ -1253,7 +1255,7 @@ // DeallocOp //===----------------------------------------------------------------------===// -def DeallocOp : Std_Op<"dealloc"> { +def DeallocOp : Std_Op<"dealloc", [MemoryEffects<[MemFree]>]> { let summary = "memory deallocation operation"; let description = [{ The `dealloc` operation frees the region of memory referenced by a memref @@ -1269,7 +1271,7 @@ ``` }]; - let arguments = (ins AnyMemRef:$memref); + let arguments = (ins Arg:$memref); let hasCanonicalizer = 1; let hasFolder = 1;