[Mlir-commits] [mlir] [MLIR] Add missing memory read effect on memref.reshape (PR #117130)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Nov 21 00:50:02 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-memref

Author: Uday Bondhugula (bondhugula)

<details>
<summary>Changes</summary>

Add missing memory read effect on memref.reshape. This in turn leads to
analyses relying on memory effects making incorrect conclusions.


---
Full diff: https://github.com/llvm/llvm-project/pull/117130.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td (+2-1) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
index c50df6ccd9aa56..a0d8d34f38237a 100644
--- a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -1529,7 +1529,8 @@ def MemRef_ReshapeOp: MemRef_Op<"reshape", [
   }];
 
   let arguments = (ins AnyRankedOrUnrankedMemRef:$source,
-                       MemRefRankOf<[AnySignlessInteger, Index], [1]>:$shape);
+                       Arg<MemRefRankOf<[AnySignlessInteger, Index], [1]>,
+                       "dynamically-sized shape", [MemRead]>:$shape);
   let results = (outs AnyRankedOrUnrankedMemRef:$result);
 
   let builders = [OpBuilder<

``````````

</details>


https://github.com/llvm/llvm-project/pull/117130


More information about the Mlir-commits mailing list