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

Mehdi Amini llvmlistbot at llvm.org
Tue Oct 15 16:05:15 PDT 2024


================
@@ -195,7 +195,12 @@ class MLIRContext {
 
   /// Return a sorted array containing the information about all registered
   /// operations.
-  ArrayRef<RegisteredOperationName> getRegisteredOperations();
+  SmallVector<RegisteredOperationName, 0> getRegisteredOperations();
----------------
joker-eph wrote:

It's not clear to me why we can't just keep returning an ArrayRef?

A copy into a vector makes it quite expensive.

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


More information about the Mlir-commits mailing list