[Mlir-commits] [mlir] 419e7b8 - [NFC] Clean up TestLinalgGreedyFusion (#94430)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 5 01:10:51 PDT 2024


Author: Hsiangkai Wang
Date: 2024-06-05T09:10:47+01:00
New Revision: 419e7b825647779dc3415aa1129627b284baf6ca

URL: https://github.com/llvm/llvm-project/commit/419e7b825647779dc3415aa1129627b284baf6ca
DIFF: https://github.com/llvm/llvm-project/commit/419e7b825647779dc3415aa1129627b284baf6ca.diff

LOG: [NFC] Clean up TestLinalgGreedyFusion (#94430)

Linalg fusion-on-memrefs are removed in dc37dc824aabbbe. There is
nothing being inserted in the erase set. Remove the useless code.

Added: 
    

Modified: 
    mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp

Removed: 
    


################################################################################
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