[Mlir-commits] [mlir] [mlir] Use llvm::is_contained (NFC) (PR #139834)

Kazu Hirata llvmlistbot at llvm.org
Tue May 13 21:03:04 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139834

None

>From 4f441123ce2729dd5d91f03d33051c14cbbdab85 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 13 May 2025 16:57:14 -0700
Subject: [PATCH] [mlir] Use llvm::is_contained (NFC)

---
 mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
index badcc583bbca2..2d604ed7a8ffc 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
@@ -1128,7 +1128,7 @@ static bool startLoopSeq(CodegenEnv &env, OpBuilder &builder, ExprId exp,
     // TODO: remove this! The same tensor level might be added for multiple
     // times due to the special handling for all-dense "sparse" output tensor
     // (see L1038).
-    if (llvm::find(tidLvls, tl) != tidLvls.end())
+    if (llvm::is_contained(tidLvls, tl))
       return;
     tidLvls.emplace_back(tl);
   });



More information about the Mlir-commits mailing list