My Project
Public Types | Public Member Functions | Friends | List of all members
mlir::OpPassManager Class Reference

#include <PassManager.h>

Inheritance diagram for mlir::OpPassManager:
Inheritance graph
[legend]

Public Types

using pass_iterator = llvm::pointee_iterator< std::vector< std::unique_ptr< Pass > >::iterator >
 Iterator over the passes in this pass manager. More...
 

Public Member Functions

 OpPassManager (OpPassManager &&rhs)
 
 OpPassManager (const OpPassManager &rhs)
 
 ~OpPassManager ()
 
OpPassManager & operator= (const OpPassManager &rhs)
 
pass_iterator begin ()
 
pass_iterator end ()
 
iterator_range< pass_iterator > getPasses ()
 
LogicalResult run (Operation *op, AnalysisManager am)
 Run the held passes over the given operation. More...
 
OpPassManager & nest (const OperationName &nestedName)
 
OpPassManager & nest (StringRef nestedName)
 
template<typename OpT >
OpPassManager & nest ()
 
void addPass (std::unique_ptr< Pass > pass)
 
template<typename OpT >
void addNestedPass (std::unique_ptr< Pass > pass)
 
size_t size () const
 Returns the number of passes held by this manager. More...
 
MLIRContext * getContext () const
 Return an instance of the context. More...
 
const OperationName & getOpName () const
 Return the operation name that this pass manager operates on. More...
 
detail::OpPassManagerImpl & getImpl ()
 Returns the internal implementation instance. More...
 
void printAsTextualPipeline (raw_ostream &os)
 
void mergeStatisticsInto (OpPassManager &other)
 Merge the pass statistics of this class into 'other'. More...
 

Friends

class PassManager
 Allow access to the constructor. More...
 

Detailed Description

This class represents a pass manager that runs passes on a specific operation type. This class is not constructed directly, but nested within other OpPassManagers or the top-level PassManager.

Member Typedef Documentation

◆ pass_iterator

using mlir::OpPassManager::pass_iterator = llvm::pointee_iterator<std::vector<std::unique_ptr<Pass> >::iterator>

Iterator over the passes in this pass manager.

Constructor & Destructor Documentation

◆ OpPassManager() [1/2]

OpPassManager::OpPassManager ( OpPassManager &&  rhs)

◆ OpPassManager() [2/2]

OpPassManager::OpPassManager ( const OpPassManager &  rhs)

◆ ~OpPassManager()

OpPassManager::~OpPassManager ( )

Member Function Documentation

◆ addNestedPass()

template<typename OpT >
void mlir::OpPassManager::addNestedPass ( std::unique_ptr< Pass >  pass)
inline

Add the given pass to a nested pass manager for the given operation kind OpT.

◆ addPass()

void OpPassManager::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.

◆ begin()

OpPassManager::pass_iterator OpPassManager::begin ( )

◆ end()

OpPassManager::pass_iterator OpPassManager::end ( )

◆ getContext()

MLIRContext * OpPassManager::getContext ( ) const

Return an instance of the context.

◆ getImpl()

OpPassManagerImpl & OpPassManager::getImpl ( )

Returns the internal implementation instance.

◆ getOpName()

const OperationName & OpPassManager::getOpName ( ) const

Return the operation name that this pass manager operates on.

◆ getPasses()

iterator_range<pass_iterator> mlir::OpPassManager::getPasses ( )
inline

◆ mergeStatisticsInto()

void OpPassManager::mergeStatisticsInto ( OpPassManager &  other)

Merge the pass statistics of this class into 'other'.

◆ nest() [1/3]

OpPassManager & OpPassManager::nest ( const OperationName &  nestedName)

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

Create an adaptor for this pass. If multi-threading is disabled, then create a synchronous adaptor.

◆ nest() [2/3]

OpPassManager & OpPassManager::nest ( StringRef  nestedName)

◆ nest() [3/3]

template<typename OpT >
OpPassManager& mlir::OpPassManager::nest ( )
inline

◆ operator=()

OpPassManager & OpPassManager::operator= ( const OpPassManager &  rhs)

◆ printAsTextualPipeline()

void OpPassManager::printAsTextualPipeline ( raw_ostream &  os)

Prints out the passes of the pass manager as the textual representation of pipelines. Note: The quality of the string representation depends entirely on the the correctness of per-pass overrides of Pass::printAsTextualPipeline.

Prints out the passes of the pass manager as the textual representation of pipelines.

◆ run()

LogicalResult OpPassManager::run ( Operation *  op,
AnalysisManager  am 
)

Run the held passes over the given operation.

Run all of the passes in this manager over the current operation.

◆ size()

size_t OpPassManager::size ( ) const

Returns the number of passes held by this manager.

Friends And Related Function Documentation

◆ PassManager

friend class PassManager
friend

Allow access to the constructor.


The documentation for this class was generated from the following files: