MLIR  16.0.0git
Public Types | Public Member Functions | Friends | List of all members
mlir::AnalysisManager Class Reference

This class represents an analysis manager for a particular operation instance. More...

#include "mlir/Pass/AnalysisManager.h"

Public Types

using PreservedAnalyses = detail::PreservedAnalyses
 

Public Member Functions

template<typename AnalysisT >
Optional< std::reference_wrapper< AnalysisT > > getCachedParentAnalysis (Operation *parentOp) const
 Query for a cached analysis on the given parent operation. More...
 
template<typename AnalysisT >
AnalysisT & getAnalysis ()
 Query for the given analysis for the current operation. More...
 
template<typename AnalysisT , typename OpT >
AnalysisT & getAnalysis ()
 Query for the given analysis for the current operation of a specific derived operation type. More...
 
template<typename AnalysisT >
Optional< std::reference_wrapper< AnalysisT > > getCachedAnalysis () const
 Query for a cached entry of the given analysis on the current operation. More...
 
template<typename AnalysisT >
AnalysisT & getChildAnalysis (Operation *op)
 Query for an analysis of a child operation, constructing it if necessary. More...
 
template<typename AnalysisT , typename OpT >
AnalysisT & getChildAnalysis (OpT child)
 Query for an analysis of a child operation of a specific derived operation type, constructing it if necessary. More...
 
template<typename AnalysisT >
Optional< std::reference_wrapper< AnalysisT > > getCachedChildAnalysis (Operation *op) const
 Query for a cached analysis of a child operation, or return null. More...
 
AnalysisManager nest (Operation *op)
 Get an analysis manager for the given operation, which must be a proper descendant of the current operation represented by this analysis manager. More...
 
void invalidate (const PreservedAnalyses &pa)
 Invalidate any non preserved analyses,. More...
 
void clear ()
 Clear any held analyses. More...
 
PassInstrumentorgetPassInstrumentor () const
 Returns a pass instrumentation object for the current operation. More...
 

Friends

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

Detailed Description

This class represents an analysis manager for a particular operation instance.

It is used to manage and cache analyses on the operation as well as those for child operations, via nested AnalysisManager instances accessible via 'slice'. This class is intended to be passed around by value, and cannot be constructed directly.

Definition at line 294 of file AnalysisManager.h.

Member Typedef Documentation

◆ PreservedAnalyses

Definition at line 299 of file AnalysisManager.h.

Member Function Documentation

◆ clear()

void mlir::AnalysisManager::clear ( )
inline

Clear any held analyses.

Definition at line 367 of file AnalysisManager.h.

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

◆ getAnalysis() [1/2]

template<typename AnalysisT >
AnalysisT& mlir::AnalysisManager::getAnalysis ( )
inline

Query for the given analysis for the current operation.

Definition at line 317 of file AnalysisManager.h.

◆ getAnalysis() [2/2]

template<typename AnalysisT , typename OpT >
AnalysisT& mlir::AnalysisManager::getAnalysis ( )
inline

Query for the given analysis for the current operation of a specific derived operation type.

Definition at line 324 of file AnalysisManager.h.

◆ getCachedAnalysis()

template<typename AnalysisT >
Optional<std::reference_wrapper<AnalysisT> > mlir::AnalysisManager::getCachedAnalysis ( ) const
inline

Query for a cached entry of the given analysis on the current operation.

Definition at line 331 of file AnalysisManager.h.

◆ getCachedChildAnalysis()

template<typename AnalysisT >
Optional<std::reference_wrapper<AnalysisT> > mlir::AnalysisManager::getCachedChildAnalysis ( Operation op) const
inline

Query for a cached analysis of a child operation, or return null.

Definition at line 351 of file AnalysisManager.h.

References mlir::Operation::getParentOp().

◆ getCachedParentAnalysis()

template<typename AnalysisT >
Optional<std::reference_wrapper<AnalysisT> > mlir::AnalysisManager::getCachedParentAnalysis ( Operation parentOp) const
inline

Query for a cached analysis on the given parent operation.

The analysis may not exist and if it does it may be out-of-date.

Definition at line 305 of file AnalysisManager.h.

References mlir::detail::NestedAnalysisMap::getParent(), and None.

◆ getChildAnalysis() [1/2]

template<typename AnalysisT >
AnalysisT& mlir::AnalysisManager::getChildAnalysis ( Operation op)
inline

Query for an analysis of a child operation, constructing it if necessary.

Definition at line 337 of file AnalysisManager.h.

◆ getChildAnalysis() [2/2]

template<typename AnalysisT , typename OpT >
AnalysisT& mlir::AnalysisManager::getChildAnalysis ( OpT  child)
inline

Query for an analysis of a child operation of a specific derived operation type, constructing it if necessary.

Definition at line 344 of file AnalysisManager.h.

◆ getPassInstrumentor()

PassInstrumentor* mlir::AnalysisManager::getPassInstrumentor ( ) const
inline

Returns a pass instrumentation object for the current operation.

This value may be null.

Definition at line 374 of file AnalysisManager.h.

Referenced by mlir::OpPassManager::getNesting(), and mlir::detail::OpToOpPassAdaptor::runOnOperation().

◆ invalidate()

void mlir::AnalysisManager::invalidate ( const PreservedAnalyses pa)
inline

Invalidate any non preserved analyses,.

Definition at line 364 of file AnalysisManager.h.

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

◆ nest()

AnalysisManager AnalysisManager::nest ( Operation op)

Get an analysis manager for the given operation, which must be a proper descendant of the current operation represented by this analysis manager.

Definition at line 847 of file Pass.cpp.

References mlir::Operation::getParentOp(), and mlir::Operation::isProperAncestor().

Referenced by mlir::OpPassManager::getNesting(), and mlir::detail::OpToOpPassAdaptor::runOnOperation().

Friends And Related Function Documentation

◆ ModuleAnalysisManager

Allow access to the constructor.

Definition at line 388 of file AnalysisManager.h.


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