LLVM API Documentation

Public Member Functions | Static Public Member Functions | Friends
llvm::PreservedAnalyses Class Reference

An abstract set of preserved analyses following a transformation pass run. More...

#include <PassManager.h>

List of all members.

Public Member Functions

 PreservedAnalyses ()
 PreservedAnalyses (const PreservedAnalyses &Arg)
 PreservedAnalyses (PreservedAnalyses &&Arg)
PreservedAnalysesoperator= (PreservedAnalyses RHS)
template<typename PassT >
void preserve ()
 Mark a particular pass as preserved, adding it to the set.
void intersect (const PreservedAnalyses &Arg)
 Intersect this set with another in place.
void intersect (PreservedAnalyses &&Arg)
 Intersect this set with a temporary other set in place.
template<typename PassT >
bool preserved () const
 Query whether a pass is marked as preserved by this set.
bool preserved (void *PassID) const
 Query whether an abstract pass ID is marked as preserved by this set.

Static Public Member Functions

static PreservedAnalyses none ()
 Convenience factory function for the empty preserved set.
static PreservedAnalyses all ()
 Construct a special preserved set that preserves all passes.

Friends

void swap (PreservedAnalyses &LHS, PreservedAnalyses &RHS)

Detailed Description

An abstract set of preserved analyses following a transformation pass run.

When a transformation pass is run, it can return a set of analyses whose results were preserved by that transformation. The default set is "none", and preserving analyses must be done explicitly.

There is also an explicit all state which can be used (for example) when the IR is not mutated at all.

Definition at line 65 of file IR/PassManager.h.


Constructor & Destructor Documentation

Definition at line 69 of file IR/PassManager.h.

Referenced by none().

Definition at line 70 of file IR/PassManager.h.

Definition at line 72 of file IR/PassManager.h.


Member Function Documentation

static PreservedAnalyses llvm::PreservedAnalyses::all ( ) [inline, static]

Intersect this set with another in place.

This is a mutating operation on this preserved set, removing all preserved passes which are not also preserved in the argument.

Definition at line 103 of file IR/PassManager.h.

References llvm::SmallPtrSetImpl< PtrType >::count(), llvm::SmallPtrSetImpl< PtrType >::erase(), and P.

Referenced by llvm::CGSCCPassManager::run(), llvm::ModulePassManager::run(), llvm::FunctionPassManager::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().

Intersect this set with a temporary other set in place.

This is a mutating operation on this preserved set, removing all preserved passes which are not also preserved in the argument.

Definition at line 119 of file IR/PassManager.h.

References P.

static PreservedAnalyses llvm::PreservedAnalyses::none ( ) [inline, static]

Convenience factory function for the empty preserved set.

Definition at line 84 of file IR/PassManager.h.

References PreservedAnalyses().

PreservedAnalyses& llvm::PreservedAnalyses::operator= ( PreservedAnalyses  RHS) [inline]

Definition at line 78 of file IR/PassManager.h.

References swap.

template<typename PassT >
void llvm::PreservedAnalyses::preserve ( ) [inline]

Mark a particular pass as preserved, adding it to the set.

Definition at line 94 of file IR/PassManager.h.

References llvm::SmallPtrSetImpl< PtrType >::insert().

Referenced by llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().

template<typename PassT >
bool llvm::PreservedAnalyses::preserved ( ) const [inline]
bool llvm::PreservedAnalyses::preserved ( void *  PassID) const [inline]

Query whether an abstract pass ID is marked as preserved by this set.

Definition at line 138 of file IR/PassManager.h.

References llvm::SmallPtrSetImpl< PtrType >::count().


Friends And Related Function Documentation

void swap ( PreservedAnalyses LHS,
PreservedAnalyses RHS 
) [friend]

Definition at line 74 of file IR/PassManager.h.

Referenced by operator=().


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