MLIR  16.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::detail::OpPassManagerImpl Struct Reference
+ Collaboration diagram for mlir::detail::OpPassManagerImpl:

Public Member Functions

 OpPassManagerImpl (OperationName opName, OpPassManager::Nesting nesting)
 
 OpPassManagerImpl (StringRef name, OpPassManager::Nesting nesting)
 
 OpPassManagerImpl (OpPassManager::Nesting nesting)
 
 OpPassManagerImpl (const OpPassManagerImpl &rhs)
 
void mergeInto (OpPassManagerImpl &rhs)
 Merge the passes of this pass manager into the one provided. More...
 
OpPassManagernest (OperationName nestedName)
 Nest a new operation pass manager for the given operation kind under this pass manager. More...
 
OpPassManagernest (StringRef nestedName)
 
OpPassManagernestAny ()
 
OpPassManagernest (OpPassManager &&nested)
 Nest the given pass manager under this pass manager. More...
 
void addPass (std::unique_ptr< Pass > pass)
 Add the given pass to this pass manager. More...
 
void clear ()
 Clear the list of passes in this pass manager, other options are preserved. More...
 
LogicalResult finalizePassList (MLIRContext *ctx)
 Finalize the pass list in preparation for execution. More...
 
Optional< OperationNamegetOpName (MLIRContext &context)
 Return the operation name of this pass manager. More...
 
Optional< StringRef > getOpName () const
 
StringRef getOpAnchorName () const
 Return the name used to anchor this pass manager. More...
 
bool canScheduleOn (MLIRContext &context, OperationName opName)
 Indicate if the current pass manager can be scheduled on the given operation type. More...
 

Public Attributes

std::string name
 The name of the operation that passes of this pass manager operate on. More...
 
Optional< OperationNameopName
 The cached OperationName (internalized in the context) for the name of the operation that passes of this pass manager operate on. More...
 
std::vector< std::unique_ptr< Pass > > passes
 The set of passes to run as part of this pass manager. More...
 
unsigned initializationGeneration
 The current initialization generation of this pass manager. More...
 
OpPassManager::Nesting nesting
 Control the implicit nesting of passes that mismatch the name set for this OpPassManager. More...
 

Detailed Description

Definition at line 85 of file Pass.cpp.

Constructor & Destructor Documentation

◆ OpPassManagerImpl() [1/4]

mlir::detail::OpPassManagerImpl::OpPassManagerImpl ( OperationName  opName,
OpPassManager::Nesting  nesting 
)
inline

Definition at line 86 of file Pass.cpp.

◆ OpPassManagerImpl() [2/4]

mlir::detail::OpPassManagerImpl::OpPassManagerImpl ( StringRef  name,
OpPassManager::Nesting  nesting 
)
inline

Definition at line 89 of file Pass.cpp.

◆ OpPassManagerImpl() [3/4]

mlir::detail::OpPassManagerImpl::OpPassManagerImpl ( OpPassManager::Nesting  nesting)
inline

Definition at line 92 of file Pass.cpp.

◆ OpPassManagerImpl() [4/4]

mlir::detail::OpPassManagerImpl::OpPassManagerImpl ( const OpPassManagerImpl rhs)
inline

Definition at line 94 of file Pass.cpp.

Member Function Documentation

◆ addPass()

void OpPassManagerImpl::addPass ( std::unique_ptr< Pass pass)

Add the given pass to this pass manager.

If this pass has a concrete operation type, it must be the same type as this pass manager.

Definition at line 189 of file Pass.cpp.

References mlir::OpPassManager::Implicit.

◆ canScheduleOn()

bool OpPassManagerImpl::canScheduleOn ( MLIRContext context,
OperationName  opName 
)

Indicate if the current pass manager can be scheduled on the given operation type.

Definition at line 269 of file Pass.cpp.

References mlir::OperationName::getRegisteredInfo().

Referenced by findPassManagerFor(), and mlir::OpPassManager::getNesting().

◆ clear()

void OpPassManagerImpl::clear ( )

Clear the list of passes in this pass manager, other options are preserved.

Definition at line 206 of file Pass.cpp.

◆ finalizePassList()

LogicalResult OpPassManagerImpl::finalizePassList ( MLIRContext ctx)

Finalize the pass list in preparation for execution.

This includes coalescing adjacent pass managers when possible, verifying scheduled passes, etc.

Definition at line 208 of file Pass.cpp.

References mlir::emitError(), mlir::failed(), mlir::failure(), mlir::succeeded(), and mlir::success().

Referenced by mlir::OpPassManager::getNesting().

◆ getOpAnchorName()

StringRef mlir::detail::OpPassManagerImpl::getOpAnchorName ( ) const
inline

Return the name used to anchor this pass manager.

This is either the name of an operation, or the result of getAnyOpAnchorName() in the case of an op-agnostic pass manager.

Definition at line 147 of file Pass.cpp.

References mlir::OpPassManager::getAnyOpAnchorName().

◆ getOpName() [1/2]

Optional<OperationName> mlir::detail::OpPassManagerImpl::getOpName ( MLIRContext context)
inline

Return the operation name of this pass manager.

Definition at line 135 of file Pass.cpp.

◆ getOpName() [2/2]

Optional<StringRef> mlir::detail::OpPassManagerImpl::getOpName ( ) const
inline

Definition at line 140 of file Pass.cpp.

◆ mergeInto()

void OpPassManagerImpl::mergeInto ( OpPassManagerImpl rhs)

Merge the passes of this pass manager into the one provided.

Definition at line 176 of file Pass.cpp.

◆ nest() [1/3]

OpPassManager& mlir::detail::OpPassManagerImpl::nest ( OperationName  nestedName)
inline

Nest a new operation pass manager for the given operation kind under this pass manager.

Definition at line 110 of file Pass.cpp.

◆ nest() [2/3]

OpPassManager& mlir::detail::OpPassManagerImpl::nest ( StringRef  nestedName)
inline

Definition at line 113 of file Pass.cpp.

◆ nest() [3/3]

OpPassManager & OpPassManagerImpl::nest ( OpPassManager &&  nested)

Nest the given pass manager under this pass manager.

Definition at line 183 of file Pass.cpp.

◆ nestAny()

OpPassManager& mlir::detail::OpPassManagerImpl::nestAny ( )
inline

Definition at line 116 of file Pass.cpp.

Member Data Documentation

◆ initializationGeneration

unsigned mlir::detail::OpPassManagerImpl::initializationGeneration

The current initialization generation of this pass manager.

This is used to indicate when a pass manager should be reinitialized.

Definition at line 167 of file Pass.cpp.

◆ name

std::string mlir::detail::OpPassManagerImpl::name

The name of the operation that passes of this pass manager operate on.

Definition at line 156 of file Pass.cpp.

◆ nesting

OpPassManager::Nesting mlir::detail::OpPassManagerImpl::nesting

Control the implicit nesting of passes that mismatch the name set for this OpPassManager.

Definition at line 171 of file Pass.cpp.

◆ opName

Optional<OperationName> mlir::detail::OpPassManagerImpl::opName

The cached OperationName (internalized in the context) for the name of the operation that passes of this pass manager operate on.

Definition at line 160 of file Pass.cpp.

◆ passes

std::vector<std::unique_ptr<Pass> > mlir::detail::OpPassManagerImpl::passes

The set of passes to run as part of this pass manager.

Definition at line 163 of file Pass.cpp.


The documentation for this struct was generated from the following file: