[Mlir-commits] [mlir] [mlir][linalg] Add more precise memory effects to linalg op (PR #92079)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri May 17 04:52:27 PDT 2024


================
@@ -289,6 +289,9 @@ def MapOp : LinalgStructuredBase_Op<"map", [
 
     bool payloadUsesValueFromOperand(OpOperand * opOperand) {
       if (isDpsInit(opOperand)) return false;
+      if (getOperation()->getRegion(0).empty()) {
+        return true;
+      }
----------------
ftynse wrote:

I don't quite get this. When the region is empty (is this even allowed?), the operand is considered used? But when it has a terminator not reading from the corresponding block argument, the operand is not considered used? Why? If we assume it is read anyway, it should be marked as such in both cases.

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


More information about the Mlir-commits mailing list