[Mlir-commits] [clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

Mehdi Amini llvmlistbot at llvm.org
Sun Jul 27 12:36:44 PDT 2025


================
@@ -20,3 +20,18 @@ add_subdirectory(Target)
 add_subdirectory(Tools)
 add_subdirectory(Transforms)
 add_subdirectory(ExecutionEngine)
+
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
+get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
+
+add_mlir_library(MLIRRegisterEverything
+  InitAllDialects.cpp
+  InitAllExtensions.cpp
+  InitAllPasses.cpp
----------------
joker-eph wrote:

Can we split this in separate libraries? `MLIRRegisterAllDialects` `MLIRRegisterAllExtensions` ``MLIRRegisterAllPasses.cpp`
I would also rename the source files to the same name as each library.


This will allow finer grain dependencies: otherwise I see places that are currently only depending on dialect initialization that would depend on all passes after your patch right now.

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


More information about the Mlir-commits mailing list