File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -180,8 +180,10 @@ class Pass {
180
180
// / should not rely on any state accessible during the execution of a pass.
181
181
// / For example, `getContext`/`getOperation`/`getAnalysis`/etc. should not be
182
182
// / invoked within this hook.
183
- // / Returns a LogicalResult to indicate failure, in which case the pass
184
- // / pipeline won't execute.
183
+ // / This method is invoked after all dependent dialects for the pipeline are
184
+ // / loaded, and is not allowed to load any further dialects (override the
185
+ // / `geDependentDialects()` for this purpose instead). Returns a LogicalResult
186
+ // / to indicate failure, in which case the pass pipeline won't execute.
185
187
virtual LogicalResult initialize (MLIRContext *context) { return success (); }
186
188
187
189
// / Indicate if the current pass can be scheduled on the given operation type.
Original file line number Diff line number Diff line change @@ -820,6 +820,9 @@ LogicalResult PassManager::run(Operation *op) {
820
820
if (failed (getImpl ().finalizePassList (context)))
821
821
return failure ();
822
822
823
+ // Notify the context that we start running a pipeline for book keeping.
824
+ context->enterMultiThreadedExecution ();
825
+
823
826
// Initialize all of the passes within the pass manager with a new generation.
824
827
llvm::hash_code newInitKey = context->getRegistryHash ();
825
828
if (newInitKey != initializationKey) {
@@ -831,9 +834,6 @@ LogicalResult PassManager::run(Operation *op) {
831
834
// Construct a top level analysis manager for the pipeline.
832
835
ModuleAnalysisManager am (op, instrumentor.get ());
833
836
834
- // Notify the context that we start running a pipeline for book keeping.
835
- context->enterMultiThreadedExecution ();
836
-
837
837
// If reproducer generation is enabled, run the pass manager with crash
838
838
// handling enabled.
839
839
LogicalResult result =
You can’t perform that action at this time.
0 commit comments