|
MLIR 22.0.0git
|
An adaptor pass used to run operation passes over nested operations. More...
#include "Pass/PassDetail.h"
Public Member Functions | |
| OpToOpPassAdaptor (OpPassManager &&mgr) | |
| OpToOpPassAdaptor (const OpToOpPassAdaptor &rhs)=default | |
| void | runOnOperation (bool verifyPasses) |
| Run the held pipeline over all operations. | |
| void | runOnOperation () override |
| The polymorphic API that runs the pass over the currently held operation. | |
| LogicalResult | tryMergeInto (MLIRContext *ctx, OpToOpPassAdaptor &rhs) |
| Try to merge the current pass adaptor into 'rhs'. | |
| MutableArrayRef< OpPassManager > | getPassManagers () |
| Returns the pass managers held by this adaptor. | |
| void | getDependentDialects (DialectRegistry &dialects) const override |
| Populate the set of dependent dialects for the passes in the current adaptor. | |
| MutableArrayRef< SmallVector< OpPassManager, 1 > > | getParallelPassManagers () |
| Return the async pass managers held by this parallel adaptor. | |
| std::string | getAdaptorName () |
| Returns the adaptor pass name. | |
| Public Member Functions inherited from mlir::PassWrapper< OpToOpPassAdaptor, OperationPass<> > | |
| ~PassWrapper () override=default | |
| Public Member Functions inherited from mlir::OperationPass< OpT > | |
| ~OperationPass () override=default | |
| Public Member Functions inherited from mlir::Pass | |
| virtual | ~Pass ()=default |
| TypeID | getTypeID () const |
| Returns the unique identifier that corresponds to this pass. | |
| const PassInfo * | lookupPassInfo () const |
| Returns the pass info for this pass, or null if unknown. | |
| virtual StringRef | getArgument () const |
| Return the command line argument used when registering this pass. | |
| virtual StringRef | getDescription () const |
| Return the command line description used when registering this pass. | |
| std::optional< StringRef > | getOpName () const |
| Returns the name of the operation that this pass operates on, or std::nullopt if this is a generic OperationPass. | |
| virtual LogicalResult | initializeOptions (StringRef options, function_ref< LogicalResult(const Twine &)> errorHandler) |
| Attempt to initialize the options of this pass from the given string. | |
| void | printAsTextualPipeline (raw_ostream &os, bool pretty=false) |
| Prints out the pass in the textual representation of pipelines. | |
| ArrayRef< Statistic * > | getStatistics () const |
| Returns the main statistics for this pass instance. | |
| MutableArrayRef< Statistic * > | getStatistics () |
| const Pass * | getThreadingSibling () const |
| Returns the thread sibling of this pass. | |
| const Pass * | getThreadingSiblingOrThis () const |
| Returns the thread sibling of this pass, or the pass itself it has no sibling. | |
Friends | |
| class | mlir::PassManager |
Additional Inherited Members | |
| Static Public Member Functions inherited from mlir::PassWrapper< OpToOpPassAdaptor, OperationPass<> > | |
| static bool | classof (const Pass *pass) |
| Support isa/dyn_cast functionality for the derived pass class. | |
| Protected Member Functions inherited from mlir::PassWrapper< OpToOpPassAdaptor, OperationPass<> > | |
| PassWrapper () | |
| PassWrapper & | operator= (const PassWrapper &)=delete |
| StringRef | getName () const override |
| Returns the derived pass name. | |
| std::unique_ptr< Pass > | clonePass () const override |
| A clone method to create a copy of this pass. | |
| Protected Member Functions inherited from mlir::OperationPass< OpT > | |
| OperationPass (TypeID passID) | |
| OperationPass (const OperationPass &)=default | |
| OperationPass & | operator= (const OperationPass &)=delete |
| OperationPass (OperationPass &&)=delete | |
| OperationPass & | operator= (OperationPass &&)=delete |
| bool | canScheduleOn (RegisteredOperationName opName) const final |
| Indicate if the current pass can be scheduled on the given operation type. | |
| OpT | getOperation () |
| Return the current operation being transformed. | |
| template<typename AnalysisT> | |
| AnalysisT & | getAnalysis () |
| Query an analysis for the current operation of the specific derived operation type. | |
| Protected Member Functions inherited from mlir::Pass | |
| Pass (TypeID passID, std::optional< StringRef > opName=std::nullopt) | |
| Pass (const Pass &other) | |
| Pass & | operator= (const Pass &)=delete |
| Pass (Pass &&)=delete | |
| Pass & | operator= (Pass &&)=delete |
| detail::PassExecutionState & | getPassState () |
| Returns the current pass state. | |
| MLIRContext & | getContext () |
| Return the MLIR context for the current operation being transformed. | |
| virtual LogicalResult | initialize (MLIRContext *context) |
| Initialize any complex state necessary for running this pass. | |
| LogicalResult | runPipeline (OpPassManager &pipeline, Operation *op) |
| Schedule an arbitrary pass pipeline on the provided operation. | |
| std::unique_ptr< Pass > | clone () const |
| A clone method to create a copy of this pass. | |
| Operation * | getOperation () |
| Return the current operation being transformed. | |
| void | signalPassFailure () |
| Signal that some invariant was broken when running. | |
| template<typename AnalysisT> | |
| AnalysisT & | getAnalysis () |
| Query an analysis for the current ir unit. | |
| template<typename AnalysisT, typename OpT> | |
| AnalysisT & | getAnalysis () |
| Query an analysis for the current ir unit of a specific derived operation type. | |
| template<typename AnalysisT> | |
| std::optional< std::reference_wrapper< AnalysisT > > | getCachedAnalysis () |
| Query a cached instance of an analysis for the current ir unit if one exists. | |
| void | markAllAnalysesPreserved () |
| Mark all analyses as preserved. | |
| template<typename... AnalysesT> | |
| void | markAnalysesPreserved () |
| Mark the provided analyses as preserved. | |
| void | markAnalysesPreserved (TypeID id) |
| template<typename AnalysisT> | |
| std::optional< std::reference_wrapper< AnalysisT > > | getCachedParentAnalysis (Operation *parent) |
| Returns the analysis for the given parent operation if it exists. | |
| template<typename AnalysisT> | |
| std::optional< std::reference_wrapper< AnalysisT > > | getCachedParentAnalysis () |
| Returns the analysis for the parent operation if it exists. | |
| template<typename AnalysisT> | |
| std::optional< std::reference_wrapper< AnalysisT > > | getCachedChildAnalysis (Operation *child) |
| Returns the analysis for the given child operation if it exists. | |
| template<typename AnalysisT> | |
| AnalysisT & | getChildAnalysis (Operation *child) |
| Returns the analysis for the given child operation, or creates it if it doesn't exist. | |
| template<typename AnalysisT, typename OpTy> | |
| AnalysisT & | getChildAnalysis (OpTy child) |
| Returns the analysis for the given child operation of specific derived operation type, or creates it if it doesn't exist. | |
| AnalysisManager | getAnalysisManager () |
| Returns the current analysis manager. | |
| void | copyOptionValuesFrom (const Pass *other) |
| Copy the option values from 'other', which is another instance of this pass. | |
| Static Protected Member Functions inherited from mlir::OperationPass< OpT > | |
| static bool | classof (const Pass *pass) |
| Support isa/dyn_cast functionality. | |
An adaptor pass used to run operation passes over nested operations.
Definition at line 25 of file PassDetail.h.
| OpToOpPassAdaptor::OpToOpPassAdaptor | ( | OpPassManager && | mgr | ) |
Definition at line 739 of file Pass.cpp.
References mlir::Pass::OpPassManager.
Referenced by OpToOpPassAdaptor(), and tryMergeInto().
|
default |
References OpToOpPassAdaptor(), and rhs.
| std::string OpToOpPassAdaptor::getAdaptorName | ( | ) |
Returns the adaptor pass name.
Definition at line 825 of file Pass.cpp.
References mlir::OpPassManager::getOpAnchorName(), getPassManagers(), and mlir::Pass::OpPassManager.
|
overridevirtual |
Populate the set of dependent dialects for the passes in the current adaptor.
Reimplemented from mlir::Pass.
Definition at line 743 of file Pass.cpp.
References mlir::OpPassManager::getDependentDialects().
|
inline |
Return the async pass managers held by this parallel adaptor.
Definition at line 54 of file PassDetail.h.
Referenced by prepareStatistics().
|
inline |
Returns the pass managers held by this adaptor.
Definition at line 47 of file PassDetail.h.
Referenced by getAdaptorName(), and prepareStatistics().
|
overridevirtual |
The polymorphic API that runs the pass over the currently held operation.
Implements mlir::Pass.
Run the held pipeline over all operations.
Run the held pipeline over all nested operations.
Definition at line 841 of file Pass.cpp.
References getContext().
| LogicalResult OpToOpPassAdaptor::tryMergeInto | ( | MLIRContext * | ctx, |
| OpToOpPassAdaptor & | rhs ) |
Try to merge the current pass adaptor into 'rhs'.
This will try to append the pass managers of this adaptor into those within rhs, or return failure if merging isn't possible. The main situation in which merging is not possible is if one of the adaptors has an any pipeline that is not compatible with a pass manager in the other adaptor. For example, if this adaptor has a func.func pipeline and rhs has an any pipeline that operates on FunctionOpInterface. In this situation the pipelines have a conflict (they both want to run on the same operations), so we can't merge.
Definition at line 748 of file Pass.cpp.
References mlir::detail::OpPassManagerImpl::canScheduleOn(), findPassManagerWithAnchor(), mlir::OpPassManager::getImpl(), mlir::OpPassManager::getOpAnchorName(), mlir::OpPassManager::getOpName(), lhs, mlir::detail::OpPassManagerImpl::mergeInto(), mlir::Pass::OpPassManager, OpToOpPassAdaptor(), rhs, and success().
|
friend |
Definition at line 92 of file PassDetail.h.