[Mlir-commits] [mlir] [mlir] Method to iterate over registered operations for a given dialect class. (PR #112344)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Oct 16 11:23:26 PDT 2024


================
@@ -711,6 +714,21 @@ ArrayRef<RegisteredOperationName> MLIRContext::getRegisteredOperations() {
   return impl->sortedRegisteredOperations;
 }
 
+/// 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.getDialect.getNamespace());
----------------
graphite-app[bot] wrote:

There's a minor typo in this line. The method call `rhs.getDialect.getNamespace()` is missing parentheses after `getDialect`. The correct syntax should be `rhs.getDialect().getNamespace()`. This small correction will ensure proper method chaining and prevent potential compilation errors.

*Spotted by [Graphite Reviewer](https://app.graphite.dev/graphite-reviewer/?org=llvm&ref=ai-review-comment)*<i class='graphite__hidden'><br /><br />Is this helpful? React 👍 or 👎 to let us know.</i>

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


More information about the Mlir-commits mailing list