[Mlir-commits] [mlir] [MLIR][Affine] Fix fusion across ops with unknown memory effects (PR #203231)
Federico Bruzzone
llvmlistbot at llvm.org
Fri Jun 12 04:27:37 PDT 2026
================
@@ -83,7 +122,7 @@ unsigned Node::getLoadOpCount(Value memref) const {
if (auto affineLoad = dyn_cast<AffineReadOpInterface>(loadOp)) {
if (memref == affineLoad.getMemRef())
++loadOpCount;
- } else if (hasEffect<MemoryEffects::Read>(loadOp, memref)) {
+ } else if (mayHaveEffect<MemoryEffects::Read>(loadOp, memref)) {
++loadOpCount;
}
}
----------------
FedericoBruzzone wrote:
I'll explain what I think here, but the same thing applies to all functions that use your new `mayHaveEffect`.
Couldn't we just pass the `MemRefDependenceGraph &mdg` as a new parameter and query it?
https://github.com/llvm/llvm-project/pull/203231
More information about the Mlir-commits
mailing list