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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Jun 28 10:10:46 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-affine

Author: lonely eagle (linuxlonelyeagle)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/206348.diff


1 Files Affected:

- (modified) mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp (-3) 


``````````diff
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);
 

``````````

</details>


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


More information about the Mlir-commits mailing list