|
LLVM
3.7.0
|
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. More... | |
| void | preserve (void *PassID) |
| Mark an abstract PassID as preserved, adding it to the set. More... | |
| void | intersect (const PreservedAnalyses &Arg) |
| Intersect this set with another in place. More... | |
| void | intersect (PreservedAnalyses &&Arg) |
| Intersect this set with a temporary other set in place. More... | |
| template<typename PassT > | |
| bool | preserved () const |
| Query whether a pass is marked as preserved by this set. More... | |
| bool | preserved (void *PassID) const |
| Query whether an abstract pass ID is marked as preserved by this set. More... | |
| bool | areAllPreserved () const |
| Test whether all passes are preserved. More... | |
Static Public Member Functions | |
| static PreservedAnalyses | none () |
| Convenience factory function for the empty preserved set. More... | |
| static PreservedAnalyses | all () |
| Construct a special preserved set that preserves all passes. More... | |
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 69 of file PassManager.h.
|
inline |
Definition at line 73 of file PassManager.h.
Referenced by none().
|
inline |
Definition at line 74 of file PassManager.h.
|
inline |
Definition at line 76 of file PassManager.h.
|
inlinestatic |
Construct a special preserved set that preserves all passes.
Definition at line 91 of file PassManager.h.
References llvm::SmallPtrSetImpl< PtrType >::insert().
Referenced by llvm::EarlyCSEPass::run(), llvm::LowerExpectIntrinsicPass::run(), llvm::InstCombinePass::run(), llvm::SimplifyCFGPass::run(), llvm::BitcodeWriterPass::run(), llvm::PrintModulePass::run(), llvm::VerifierPass::run(), llvm::PrintFunctionPass::run(), llvm::AssumptionPrinterPass::run(), llvm::DominatorTreePrinterPass::run(), llvm::DominatorTreeVerifierPass::run(), llvm::PassManager< IRUnitT >::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), llvm::LazyCallGraphPrinterPass::run(), llvm::LoopPrinterPass::run(), llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run(), llvm::RequireAnalysisPass< AnalysisT >::run(), and llvm::InvalidateAnalysisPass< AnalysisT >::run().
|
inline |
Test whether all passes are preserved.
This is used primarily to optimize for the case of no changes which will common in many scenarios.
Definition at line 154 of file PassManager.h.
References llvm::SmallPtrSetImpl< PtrType >::count().
Referenced by intersect(), and preserve().
|
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 110 of file PassManager.h.
References areAllPreserved(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::SmallPtrSetImpl< PtrType >::erase(), and P.
Referenced by llvm::PassManager< IRUnitT >::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
|
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 126 of file PassManager.h.
References areAllPreserved(), and P.
|
inlinestatic |
Convenience factory function for the empty preserved set.
Definition at line 88 of file PassManager.h.
References PreservedAnalyses().
Referenced by llvm::LowerExpectIntrinsicPass::run(), llvm::SimplifyCFGPass::run(), and llvm::InvalidateAllAnalysesPass::run().
|
inline |
Definition at line 82 of file PassManager.h.
References swap.
|
inline |
Mark a particular pass as preserved, adding it to the set.
Definition at line 98 of file PassManager.h.
References preserve().
Referenced by preserve(), llvm::EarlyCSEPass::run(), llvm::InstCombinePass::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
|
inline |
Mark an abstract PassID as preserved, adding it to the set.
Definition at line 101 of file PassManager.h.
References areAllPreserved(), and llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Query whether a pass is marked as preserved by this set.
Definition at line 139 of file PassManager.h.
Referenced by llvm::CGSCCAnalysisManagerModuleProxy::Result::invalidate(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::invalidate(), and llvm::FunctionAnalysisManagerModuleProxy::Result::invalidate().
|
inline |
Query whether an abstract pass ID is marked as preserved by this set.
Definition at line 145 of file PassManager.h.
References llvm::SmallPtrSetImpl< PtrType >::count().
|
friend |
Definition at line 78 of file PassManager.h.
Referenced by operator=().
1.8.6