[Mlir-commits] [mlir] [mlir][affine] Remove redundant copyNests.clear() after declaration (NFC) (PR #206348)

lonely eagle llvmlistbot at llvm.org
Sun Jun 28 10:10:14 PDT 2026


https://github.com/linuxlonelyeagle created https://github.com/llvm/llvm-project/pull/206348

The clear() call immediately following the declaration of copyNests is redundant since a default-constructed DenseSet is already empty. Remove it.

>From fdcece0399d106dcc7f7b0b135f9e9973066868f Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Sun, 28 Jun 2026 17:07:45 +0000
Subject: [PATCH] cleanup unuse code.

---
 .../lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
index 6537b8a55c159..82923b2af5bdb 100644
--- a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
@@ -208,9 +208,6 @@ void AffineDataCopyGeneration::runOnOperation() {
   // nests are stored herein.
   DenseSet<Operation *> copyNests;
 
-  // Clear recorded copy nests.
-  copyNests.clear();
-
   for (auto &block : f)
     runOnBlock(&block, copyNests);
 



More information about the Mlir-commits mailing list