Page MenuHomePhabricator

Decouple OpPassManager from the the MLIRContext (NFC)
ClosedPublic

Authored by mehdi_amini on Sep 2 2020, 10:34 PM.

Details

Reviewers
rriddle
silvas
Summary

This is allowing to build an OpPassManager from a StringRef instead of an
Identifier, which enables building pipelines without an MLIRContext.
An identifier is still cached on-demand on the OpPassManager for efficiency
during the IR traversal.

Diff Detail

Event Timeline

mehdi_amini created this revision.Sep 2 2020, 10:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2020, 10:34 PM
mehdi_amini requested review of this revision.Sep 2 2020, 10:34 PM
rriddle accepted this revision.Sep 2 2020, 10:37 PM
rriddle added inline comments.
mlir/include/mlir/Pass/PassManager.h
311

nit: Add a comment.

mlir/lib/Pass/Pass.cpp
405

When is this one going to be used?

This revision is now accepted and ready to land.Sep 2 2020, 10:37 PM
mehdi_amini closed this revision.Sep 7 2020, 5:08 PM
mlir/lib/Pass/Pass.cpp
405

It is used when building the pipeline: merging and nesting new OpPassManager.
The other one is used in the "run" path.