[PATCH] D74461: Remove static registration for dialects, and the "alwayslink" hack for passes

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 23:21:25 PST 2020


rriddle accepted this revision.
rriddle added inline comments.


================
Comment at: mlir/include/mlir/InitAllPasses.h:39
+
+// This function must be called to force registering the MLIR passes with the
+// global registry.
----------------
jpienaar wrote:
> s/must be called/may be called/
> 
> s/force registering the/register all/ ? 
Use /// for comments.


================
Comment at: mlir/include/mlir/InitAllPasses.h:47
+inline void registerAllPasses() {
+
+  // At the moment we still rely on global initializers,
----------------
nit: Drop the newline here.


================
Comment at: mlir/include/mlir/InitAllPasses.h:80
+  // Analysis
+  createParallelismDetectionTestPass();
+
----------------
I thought this was removed?


================
Comment at: mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp:287
+  // Do nothing, this will be enough to force link this file and the static
+  // registration will kick-in. This is temporary while we're refactoring pass
+  // registration to move away from static constructors.
----------------
What are you moving pass registration to?


================
Comment at: mlir/test/Dialect/SPIRV/TestAvailability.cpp:217
+namespace mlir {
+void registerConvertToTargetEnvPass() {
+  PassRegistration<ConvertToTargetEnv> convertToTargetEnvPass(
----------------
Can you not do `void mlir::registerConvertToTargetEnvPass`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74461





More information about the llvm-commits mailing list