LLVM API Documentation
An abstract set of preserved analyses following a transformation pass run. More...
#include <PassManager.h>
Public Member Functions | |
PreservedAnalyses () | |
PreservedAnalyses (const PreservedAnalyses &Arg) | |
PreservedAnalyses (PreservedAnalyses &&Arg) | |
PreservedAnalyses & | operator= (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) |
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.
llvm::PreservedAnalyses::PreservedAnalyses | ( | ) | [inline] |
Definition at line 69 of file IR/PassManager.h.
Referenced by none().
llvm::PreservedAnalyses::PreservedAnalyses | ( | const PreservedAnalyses & | Arg | ) | [inline] |
Definition at line 70 of file IR/PassManager.h.
llvm::PreservedAnalyses::PreservedAnalyses | ( | PreservedAnalyses && | Arg | ) | [inline] |
Definition at line 72 of file IR/PassManager.h.
static PreservedAnalyses llvm::PreservedAnalyses::all | ( | ) | [inline, static] |
Construct a special preserved set that preserves all passes.
Definition at line 87 of file IR/PassManager.h.
References llvm::SmallPtrSetImpl< PtrType >::insert().
Referenced by llvm::CGSCCPassManager::run(), llvm::BitcodeWriterPass::run(), llvm::PrintModulePass::run(), llvm::PrintFunctionPass::run(), llvm::VerifierPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::ModulePassManager::run(), llvm::FunctionPassManager::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), llvm::LazyCallGraphPrinterPass::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
void llvm::PreservedAnalyses::intersect | ( | const PreservedAnalyses & | Arg | ) | [inline] |
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().
void llvm::PreservedAnalyses::intersect | ( | PreservedAnalyses && | Arg | ) | [inline] |
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.
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().
bool llvm::PreservedAnalyses::preserved | ( | ) | const [inline] |
Query whether a pass is marked as preserved by this set.
Definition at line 132 of file IR/PassManager.h.
Referenced by llvm::CGSCCAnalysisManagerModuleProxy::Result::invalidate(), llvm::detail::AnalysisResultModel< IRUnitT, PassT, ResultT, false >::invalidate(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::invalidate(), and llvm::FunctionAnalysisManagerModuleProxy::Result::invalidate().
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().
void swap | ( | PreservedAnalyses & | LHS, |
PreservedAnalyses & | RHS | ||
) | [friend] |
Definition at line 74 of file IR/PassManager.h.
Referenced by operator=().