[Mlir-commits] [mlir] [mlir][Transform] Provide a minimal set of utils that allow implementing a simple transform dialect interpreter pass (PR #68330)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu Oct 5 10:50:12 PDT 2023


================
@@ -63,6 +67,21 @@ def Transform_Dialect : Dialect {
       using ExtensionTypePrintingHook =
           std::function<void (::mlir::Type, ::mlir::AsmPrinter &)>;
 
+      /// Appends the given module as a transform symbol library available to
+      /// all dialect users.
+      void registerLibraryModule(::mlir::OwningOpRef<::mlir::ModuleOp> &&
+                                 library) {
+        libraryModules.push_back(std::move(library));
+      }
+
+      /// Returns a range of registered library modules.
+      auto getLibraryModules() const {
+        return ::llvm::map_range(libraryModules, [
+        ](const ::mlir::OwningOpRef<::mlir::ModuleOp> &library) {
----------------
ftynse wrote:

formatting around `[]` looks strange

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


More information about the Mlir-commits mailing list