MLIR
20.0.0git
|
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 > | |
std::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 > | |
std::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 > | |
std::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... | |
PassInstrumentor * | getPassInstrumentor () const |
Returns a pass instrumentation object for the current operation. More... | |
Friends | |
class | ModuleAnalysisManager |
Allow access to the constructor. More... | |
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 295 of file AnalysisManager.h.
Definition at line 300 of file AnalysisManager.h.
|
inline |
Clear any held analyses.
Definition at line 368 of file AnalysisManager.h.
|
inline |
Query for the given analysis for the current operation.
Definition at line 318 of file AnalysisManager.h.
References getPassInstrumentor().
Referenced by mlir::Pass::getAnalysis().
|
inline |
Query for the given analysis for the current operation of a specific derived operation type.
Definition at line 325 of file AnalysisManager.h.
References getPassInstrumentor().
|
inline |
Query for a cached entry of the given analysis on the current operation.
Definition at line 332 of file AnalysisManager.h.
Referenced by mlir::Pass::getCachedAnalysis().
|
inline |
Query for a cached analysis of a child operation, or return null.
Definition at line 352 of file AnalysisManager.h.
References mlir::Operation::getParentOp().
Referenced by mlir::Pass::getCachedChildAnalysis().
|
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 306 of file AnalysisManager.h.
References mlir::detail::NestedAnalysisMap::getParent().
Referenced by mlir::Pass::getCachedParentAnalysis().
|
inline |
Query for an analysis of a child operation, constructing it if necessary.
Definition at line 338 of file AnalysisManager.h.
References nest().
Referenced by mlir::Pass::getChildAnalysis().
|
inline |
Query for an analysis of a child operation of a specific derived operation type, constructing it if necessary.
Definition at line 345 of file AnalysisManager.h.
References nest().
|
inline |
Returns a pass instrumentation object for the current operation.
This value may be null.
Definition at line 375 of file AnalysisManager.h.
Referenced by getAnalysis().
|
inline |
Invalidate any non preserved analyses,.
Definition at line 365 of file AnalysisManager.h.
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 915 of file Pass.cpp.
References mlir::Operation::getParentOp(), and mlir::Operation::isProperAncestor().
Referenced by getChildAnalysis().
|
friend |
Allow access to the constructor.
Definition at line 389 of file AnalysisManager.h.