[Mlir-commits] [mlir] [mlir][linalg] Add more precise memory effects to linalg op (PR #92079)
Matthias Springer
llvmlistbot at llvm.org
Thu May 23 05:09:14 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;
+ }
----------------
matthias-springer wrote:
Why does this lead to a crash? The bufferization impl for LinalgOps calls `cloneWithoutRegions`, but inlines the original region immediately afterwards. There should be no call to `payloadUsesValueFromOperand` in-between. (Even if there is one, this function would just return `false` and should not crash.)
Basically, the op is invalid without a region body. Generally speaking, helper functions on an op are allowed to function incorrectly if the op is invalid.
https://github.com/llvm/llvm-project/pull/92079
More information about the Mlir-commits
mailing list