[Mlir-commits] [mlir] [mlir][Affine] Fix crash in affine-loop-fusion pass by guarding against an empty op list (PR #144841)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu Jun 19 00:46:38 PDT 2025


================
@@ -997,6 +997,8 @@ struct GreedyFusion {
           if (producerConsumerMemrefs.count(
                   cast<AffineWriteOpInterface>(op).getMemRef()))
             dstMemrefOps.push_back(op);
+        if (dstMemrefOps.size() == 0)
----------------
ftynse wrote:

clang-tidy: use `.empty()` instead of comparing size with 0.

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


More information about the Mlir-commits mailing list