[PATCH] D67258: Out-of-tree machine IR passes

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 08:58:14 PST 2021


Meinersbur added a comment.

`RegisterMIRPasses` uses the "old" mechanism using a static initializer to register passes. For some time now the llvm-project it trying to get rid of static initializers because of their problems (static initialization order fiasco, more difficult to use as a library, etc.) AFAIU, especially MLIR was designed to avoid static initializers from the ground up, e.g. to register a dialect one has to call e.g. `registerAffinePasses` explicitly instead of relying on static initializers. I feel the patch re-introduces what we were trying to avoid.

For LLVM, the new mechanism used for NPM is `Passes/PassPlugin.h` which use dlopen and dlsym to execute a defined entry-point (`llvmGetPassPluginInfo`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67258/new/

https://reviews.llvm.org/D67258



More information about the llvm-commits mailing list