My Project
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
mlir::Pass Class Referenceabstract

#include <Pass.h>

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

Classes

struct  ListOption
 
struct  Option
 This class represents a specific pass option, with a provided data type. More...
 
class  Statistic
 

Public Member Functions

virtual ~Pass ()=default
 
const PassIDgetPassID () const
 Returns the unique identifier that corresponds to this pass. More...
 
const PassInfolookupPassInfo () const
 Returns the pass info for this pass. More...
 
virtual StringRef getName ()=0
 Returns the derived pass name. More...
 
Optional< StringRef > getOpName () const
 
LogicalResult initializeOptions (StringRef options)
 Attempt to initialize the options of this pass from the given string. More...
 
void printAsTextualPipeline (raw_ostream &os)
 
ArrayRef< Statistic * > getStatistics () const
 Returns the main statistics for this pass instance. More...
 
MutableArrayRef< Statistic * > getStatistics ()
 

Static Public Member Functions

static const PassInfolookupPassInfo (const PassID *passID)
 Returns the pass info for the specified pass class or null if unknown. More...
 
template<typename PassT >
static const PassInfolookupPassInfo ()
 

Protected Member Functions

 Pass (const PassID *passID, Optional< StringRef > opName=llvm::None)
 
detail::PassExecutionStategetPassState ()
 Returns the current pass state. More...
 
MLIRContextgetContext ()
 Return the MLIR context for the current function being transformed. More...
 
virtual void runOnOperation ()=0
 The polymorphic API that runs the pass over the currently held operation. More...
 
virtual std::unique_ptr< Passclone () const =0
 A clone method to create a copy of this pass. More...
 
OperationgetOperation ()
 Return the current operation being transformed. More...
 
AnalysisManager getAnalysisManager ()
 Returns the current analysis manager. More...
 
void copyOptionValuesFrom (const Pass *other)
 

Friends

class OpPassManager
 Allow access to 'clone' and 'run'. More...
 

Detailed Description

The abstract base pass class. This class contains information describing the derived pass object, e.g its kind and abstract PassInfo.

Constructor & Destructor Documentation

◆ ~Pass()

virtual mlir::Pass::~Pass ( )
virtualdefault

◆ Pass()

mlir::Pass::Pass ( const PassID passID,
Optional< StringRef >  opName = llvm::None 
)
inlineexplicitprotected

Member Function Documentation

◆ clone()

virtual std::unique_ptr<Pass> mlir::Pass::clone ( ) const
protectedpure virtual

◆ copyOptionValuesFrom()

void Pass::copyOptionValuesFrom ( const Pass other)
protected

Copy the option values from 'other', which is another instance of this pass.

◆ getAnalysisManager()

AnalysisManager mlir::Pass::getAnalysisManager ( )
inlineprotected

Returns the current analysis manager.

◆ getContext()

MLIRContext& mlir::Pass::getContext ( )
inlineprotected

Return the MLIR context for the current function being transformed.

◆ getName()

virtual StringRef mlir::Pass::getName ( )
pure virtual

◆ getOperation()

Operation* mlir::Pass::getOperation ( )
inlineprotected

Return the current operation being transformed.

◆ getOpName()

Optional<StringRef> mlir::Pass::getOpName ( ) const
inline

Returns the name of the operation that this pass operates on, or None if this is a generic OperationPass.

◆ getPassID()

const PassID* mlir::Pass::getPassID ( ) const
inline

Returns the unique identifier that corresponds to this pass.

◆ getPassState()

detail::PassExecutionState& mlir::Pass::getPassState ( )
inlineprotected

Returns the current pass state.

◆ getStatistics() [1/2]

ArrayRef<Statistic *> mlir::Pass::getStatistics ( ) const
inline

Returns the main statistics for this pass instance.

◆ getStatistics() [2/2]

MutableArrayRef<Statistic *> mlir::Pass::getStatistics ( )
inline

◆ initializeOptions()

LogicalResult Pass::initializeOptions ( StringRef  options)

Attempt to initialize the options of this pass from the given string.

◆ lookupPassInfo() [1/3]

const PassInfo * mlir::Pass::lookupPassInfo ( const PassID passID)
static

Returns the pass info for the specified pass class or null if unknown.

◆ lookupPassInfo() [2/3]

template<typename PassT >
static const PassInfo* mlir::Pass::lookupPassInfo ( )
inlinestatic

◆ lookupPassInfo() [3/3]

const PassInfo* mlir::Pass::lookupPassInfo ( ) const
inline

Returns the pass info for this pass.

◆ printAsTextualPipeline()

void Pass::printAsTextualPipeline ( raw_ostream &  os)

Prints out the pass in the textual representation of pipelines. If this is an adaptor pass, print with the op_name(sub_pass,...) format.

◆ runOnOperation()

virtual void mlir::Pass::runOnOperation ( )
protectedpure virtual

The polymorphic API that runs the pass over the currently held operation.

Implemented in mlir::ModulePass< T >, mlir::FunctionPass< T >, mlir::detail::OpToOpPassAdaptorParallel, and mlir::detail::OpToOpPassAdaptor.

Friends And Related Function Documentation

◆ OpPassManager

friend class OpPassManager
friend

Allow access to 'clone' and 'run'.


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