[Mlir-commits] [mlir] [NFC] Clean up TestLinalgGreedyFusion (PR #94430)
Hsiangkai Wang
llvmlistbot at llvm.org
Tue Jun 4 22:50:57 PDT 2024
https://github.com/Hsiangkai created https://github.com/llvm/llvm-project/pull/94430
Linalg fusion-on-memrefs are removed in dc37dc824aabbbe. There is nothing being inserted in the erase set. Remove the useless code.
>From c08df460006e0ecdf6569f8b7d16704e27b8848b Mon Sep 17 00:00:00 2001
From: Hsiangkai Wang <hsiangkai.wang at arm.com>
Date: Wed, 5 Jun 2024 06:02:25 +0100
Subject: [PATCH] [NFC] Clean up TestLinalgGreedyFusion
Linalg fusion-on-memrefs are removed in dc37dc824aabbbe. There is
nothing being inserted in the erase set. Remove the useless code.
---
.../lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp | 8 --------
1 file changed, 8 deletions(-)
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
index 1466f541f231c..2d8ee2f9bb6e3 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
@@ -24,7 +24,6 @@ using namespace mlir::linalg;
static LogicalResult fuseLinalgOpsGreedily(func::FuncOp f) {
OpBuilder b(f);
- DenseSet<Operation *> eraseSet;
// Save original Linalg ops, we only want to make a pass over those.
SmallVector<LinalgOp, 8> linalgOps;
@@ -56,13 +55,6 @@ static LogicalResult fuseLinalgOpsGreedily(func::FuncOp f) {
}
}
}
- // The `fuseProducerOfBuffer` function performs structural checks and in
- // particular that no covering read or write exist between the consumer and
- // the producer. As a consequence, the only fusions that may occur preserve
- // subsequent dependences and are guaranteed by construction to produce the
- // whole view. We may thus erase the producer once it is fused.
- for (auto *e : eraseSet)
- e->erase();
return changed ? success() : failure();
}
More information about the Mlir-commits
mailing list