[Mlir-commits] [mlir] [mlir] Use llvm::lower_bound (NFC) (PR #141386)

Kazu Hirata llvmlistbot at llvm.org
Sat May 24 18:18:06 PDT 2025


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

None

>From 7357896b66e44adc0c30b36864543b7168014084 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 24 May 2025 16:53:16 -0700
Subject: [PATCH] [mlir] Use llvm::lower_bound (NFC)

---
 mlir/lib/IR/MLIRContext.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp
index d43dcc5a5e2fd..2ab6b6189b438 100644
--- a/mlir/lib/IR/MLIRContext.cpp
+++ b/mlir/lib/IR/MLIRContext.cpp
@@ -692,12 +692,10 @@ ArrayRef<RegisteredOperationName> MLIRContext::getRegisteredOperations() {
 /// Return information for registered operations by dialect.
 ArrayRef<RegisteredOperationName>
 MLIRContext::getRegisteredOperationsByDialect(StringRef dialectName) {
-  auto lowerBound =
-      std::lower_bound(impl->sortedRegisteredOperations.begin(),
-                       impl->sortedRegisteredOperations.end(), dialectName,
-                       [](auto &lhs, auto &rhs) {
-                         return lhs.getDialect().getNamespace().compare(rhs);
-                       });
+  auto lowerBound = llvm::lower_bound(
+      impl->sortedRegisteredOperations, dialectName, [](auto &lhs, auto &rhs) {
+        return lhs.getDialect().getNamespace().compare(rhs);
+      });
 
   if (lowerBound == impl->sortedRegisteredOperations.end() ||
       lowerBound->getDialect().getNamespace() != dialectName)



More information about the Mlir-commits mailing list