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 eraseSet; // Save original Linalg ops, we only want to make a pass over those. SmallVector 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(); }