[Mlir-commits] [mlir] [mlir] Method to iterate over registered operations for a given dialect class. (PR #112344)
River Riddle
llvmlistbot at llvm.org
Wed Oct 16 09:38:51 PDT 2024
================
@@ -188,7 +188,11 @@ class MLIRContextImpl {
/// This is a sorted container of registered operations for a deterministic
/// and efficient `getRegisteredOperations` implementation.
- SmallVector<RegisteredOperationName, 0> sortedRegisteredOperations;
+ SmallVector<std::pair<StringRef, RegisteredOperationName>, 0>
----------------
River707 wrote:
I don't see why you need the dialect name stored this way, there are many ways around it. The easiest would be getting the dialect name from the RegisteredOperationName for comparison in the lower bound: `getDialect().getNamespace()`. (There are other ways as well, e.g. comparing a string directly against the operation name). That would remove the need to have the StringRef here, or the `transformedOperations` field.
https://github.com/llvm/llvm-project/pull/112344
More information about the Mlir-commits
mailing list