[Mlir-commits] [mlir] [mlir] Method to iterate over registered operations for a given dialect class. (PR #112344)
Mehdi Amini
llvmlistbot at llvm.org
Wed Oct 16 12:05:59 PDT 2024
================
@@ -188,7 +188,15 @@ 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>
+ sortedRegisteredOperations;
+
+ /// This stores the transformed operations when calling
+ /// `getRegisteredOperations`.
+ SmallVector<RegisteredOperationName, 0> transformedOperations;
+
+ /// This returns the number of registered operations for a given dialect.
+ llvm::DenseMap<StringRef, size_t> getCountByDialectName;
----------------
joker-eph wrote:
This isn't done right now?
The suggestion I believe is to add a "int operationCount = 0;` in the `class Dialect` where the counter would live and remove this map entirely from the Context.
https://github.com/llvm/llvm-project/pull/112344
More information about the Mlir-commits
mailing list