[Mlir-commits] [mlir] [mlir] Use DenseMap::contains (NFC) (PR #140351)

Kazu Hirata llvmlistbot at llvm.org
Fri May 16 21:53:47 PDT 2025


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

None

>From 7d7be320ca2f8c3396676034241c7ea4f7d408d5 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 16 May 2025 21:39:58 -0700
Subject: [PATCH] [mlir] Use DenseMap::contains (NFC)

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

diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index b6a014e2f0a31..c289faaf9983c 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -793,7 +793,7 @@ void AsyncToAsyncRuntimePass::runOnOperation() {
   // Returns true if operation is inside the coroutine.
   auto isInCoroutine = [&](Operation *op) -> bool {
     auto parentFunc = op->getParentOfType<func::FuncOp>();
-    return coros->find(parentFunc) != coros->end();
+    return coros->contains(parentFunc);
   };
 
   // Lower async operations to async.runtime operations.



More information about the Mlir-commits mailing list