[Mlir-commits] [mlir] 0a63679 - Add documentation for getDependentDialects() in the PassManagement infra docs

Mehdi Amini llvmlistbot at llvm.org
Mon Sep 7 16:59:20 PDT 2020


Author: Mehdi Amini
Date: 2020-09-07T23:59:11Z
New Revision: 0a63679267e4a2e81c6b193c25ed2579c65eb824

URL: https://github.com/llvm/llvm-project/commit/0a63679267e4a2e81c6b193c25ed2579c65eb824
DIFF: https://github.com/llvm/llvm-project/commit/0a63679267e4a2e81c6b193c25ed2579c65eb824.diff

LOG: Add documentation for getDependentDialects() in the PassManagement infra docs

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D87181

Added: 
    

Modified: 
    mlir/docs/PassManagement.md

Removed: 
    


################################################################################
diff  --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md
index 92ca92218219..6e577db4501c 100644
--- a/mlir/docs/PassManagement.md
+++ b/mlir/docs/PassManagement.md
@@ -104,6 +104,15 @@ struct MyOperationPass : public OperationPass<MyOperationPass> {
 };
 ```
 
+### Dependent Dialects
+
+Dialects must be loaded in the MLIRContext before entities from these dialects
+(operations, types, attributes, ...) can be created. Dialects must be loaded
+before starting the multi-threaded pass pipeline execution. To this end, a pass
+that can create an entity from a dialect that isn't already loaded must express
+this by overriding the `getDependentDialects()` method and declare this list of
+Dialects explicitly.
+
 ## Analysis Management
 
 An important concept, along with transformation passes, are analyses. These are
@@ -684,6 +693,8 @@ It contains the following fields:
 *   description
     -   A longer, more detailed description of the pass. This is used when
         generating pass documentation.
+*   dependentDialects
+    -   A list of strings that are the Dialect classes this pass can introduce.
 *   constructor
     -   A piece of C++ code used to create a default instance of the pass.
 *   options


        


More information about the Mlir-commits mailing list