LLVM 22.0.0git
llvm::PreservedAnalyses::PreservedAnalysisChecker Class Reference

A checker object that makes it easy to query for whether an analysis or some set covering it is preserved. More...

#include "llvm/IR/Analysis.h"

Public Member Functions

bool preserved ()
 Returns true if the checker's analysis was not abandoned and either.
bool preservedWhenStateless ()
 Return true if the checker's analysis was not abandoned, i.e.
template<typename AnalysisSetT>
bool preservedSet ()
 Returns true if the checker's analysis was not abandoned and either.

Friends

class PreservedAnalyses

Detailed Description

A checker object that makes it easy to query for whether an analysis or some set covering it is preserved.

Definition at line 233 of file Analysis.h.

Member Function Documentation

◆ preserved()

bool llvm::PreservedAnalyses::PreservedAnalysisChecker::preserved ( )
inline

Returns true if the checker's analysis was not abandoned and either.

  • the analysis is explicitly preserved or
  • all analyses are preserved.

Definition at line 250 of file Analysis.h.

◆ preservedSet()

template<typename AnalysisSetT>
bool llvm::PreservedAnalyses::PreservedAnalysisChecker::preservedSet ( )
inline

Returns true if the checker's analysis was not abandoned and either.

  • AnalysisSetT is explicitly preserved or
  • all analyses are preserved.

Definition at line 263 of file Analysis.h.

◆ preservedWhenStateless()

bool llvm::PreservedAnalyses::PreservedAnalysisChecker::preservedWhenStateless ( )
inline

Return true if the checker's analysis was not abandoned, i.e.

it was not explicitly invalidated. Even if the analysis is not explicitly preserved, if the analysis is known stateless, then it is preserved.

Definition at line 258 of file Analysis.h.

Referenced by llvm::ShouldRunExtraPasses< MarkerTy >::Result::invalidate(), and llvm::ShouldRunExtraPasses< MarkerTy >::Result::invalidate().

◆ PreservedAnalyses

friend class PreservedAnalyses
friend

Definition at line 234 of file Analysis.h.

References llvm::count(), and PreservedAnalyses.

Referenced by PreservedAnalyses.


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