MLIR  20.0.0git
Classes | Public Member Functions | Friends | List of all members
mlir::detail::PreservedAnalyses Class Reference

A utility class to represent the analyses that are known to be preserved. More...

#include "mlir/Pass/AnalysisManager.h"

Public Member Functions

void preserveAll ()
 Mark all analyses as preserved. More...
 
bool isAll () const
 Returns true if all analyses were marked preserved. More...
 
bool isNone () const
 Returns true if no analyses were marked preserved. More...
 
template<typename AnalysisT >
void preserve ()
 Preserve the given analyses. More...
 
template<typename AnalysisT , typename AnalysisT2 , typename... OtherAnalysesT>
void preserve ()
 
void preserve (TypeID id)
 
template<typename AnalysisT >
bool isPreserved () const
 Returns true if the given analysis has been marked as preserved. More...
 
bool isPreserved (TypeID id) const
 

Friends

template<typename >
struct AnalysisModel
 AnalysisModel need access to unpreserve(). More...
 

Detailed Description

A utility class to represent the analyses that are known to be preserved.

Definition at line 30 of file AnalysisManager.h.

Member Function Documentation

◆ isAll()

bool mlir::detail::PreservedAnalyses::isAll ( ) const
inline

Returns true if all analyses were marked preserved.

Definition at line 39 of file AnalysisManager.h.

Referenced by mlir::detail::NestedAnalysisMap::invalidate().

◆ isNone()

bool mlir::detail::PreservedAnalyses::isNone ( ) const
inline

Returns true if no analyses were marked preserved.

Definition at line 44 of file AnalysisManager.h.

Referenced by mlir::detail::NestedAnalysisMap::invalidate().

◆ isPreserved() [1/2]

template<typename AnalysisT >
bool mlir::detail::PreservedAnalyses::isPreserved ( ) const
inline

Returns true if the given analysis has been marked as preserved.

Note that this simply checks for the presence of a given analysis ID and should not be used as a general preservation checker.

Definition at line 62 of file AnalysisManager.h.

Referenced by mlir::detail::analysis_impl::isInvalidated().

◆ isPreserved() [2/2]

bool mlir::detail::PreservedAnalyses::isPreserved ( TypeID  id) const
inline

Definition at line 65 of file AnalysisManager.h.

◆ preserve() [1/3]

template<typename AnalysisT >
void mlir::detail::PreservedAnalyses::preserve ( )
inline

Preserve the given analyses.

Definition at line 48 of file AnalysisManager.h.

Referenced by mlir::Pass::markAnalysesPreserved(), and preserve().

◆ preserve() [2/3]

template<typename AnalysisT , typename AnalysisT2 , typename... OtherAnalysesT>
void mlir::detail::PreservedAnalyses::preserve ( )
inline

Definition at line 52 of file AnalysisManager.h.

References preserve().

◆ preserve() [3/3]

void mlir::detail::PreservedAnalyses::preserve ( TypeID  id)
inline

Definition at line 56 of file AnalysisManager.h.

◆ preserveAll()

void mlir::detail::PreservedAnalyses::preserveAll ( )
inline

Mark all analyses as preserved.

Definition at line 36 of file AnalysisManager.h.

Referenced by mlir::Pass::markAllAnalysesPreserved().

Friends And Related Function Documentation

◆ AnalysisModel

template<typename >
friend struct AnalysisModel
friend

AnalysisModel need access to unpreserve().

Definition at line 76 of file AnalysisManager.h.


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