LLVM API Documentation
A CRTP base used to implement analysis managers. More...
#include <PassManager.h>
Public Member Functions | |
template<typename PassT > | |
PassT::Result & | getResult (IRUnitT IR) |
Get the result of an analysis pass for this module. | |
template<typename PassT > | |
PassT::Result * | getCachedResult (IRUnitT IR) const |
Get the cached result of an analysis pass for this module. | |
template<typename PassT > | |
void | registerPass (PassT Pass) |
Register an analysis pass with the manager. | |
template<typename PassT > | |
void | invalidate (Module *M) |
Invalidate a specific analysis pass for an IR module. | |
void | invalidate (IRUnitT IR, const PreservedAnalyses &PA) |
Invalidate analyses cached for an IR unit. | |
Protected Types | |
typedef detail::AnalysisResultConcept < IRUnitT > | ResultConceptT |
typedef detail::AnalysisPassConcept < IRUnitT, DerivedT > | PassConceptT |
Protected Member Functions | |
AnalysisManagerBase () | |
AnalysisManagerBase (AnalysisManagerBase &&Arg) | |
AnalysisManagerBase & | operator= (AnalysisManagerBase &&RHS) |
PassConceptT & | lookupPass (void *PassID) |
Lookup a registered analysis pass. | |
const PassConceptT & | lookupPass (void *PassID) const |
Lookup a registered analysis pass. |
A CRTP base used to implement analysis managers.
This class template serves as the boiler plate of an analysis manager. Any analysis manager can be implemented on top of this base class. Any implementation will be required to provide specific hooks:
The details of the call pattern are within.
Definition at line 559 of file IR/PassManager.h.
typedef detail::AnalysisPassConcept<IRUnitT, DerivedT> llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::PassConceptT [protected] |
Definition at line 571 of file IR/PassManager.h.
typedef detail::AnalysisResultConcept<IRUnitT> llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::ResultConceptT [protected] |
Definition at line 570 of file IR/PassManager.h.
llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::AnalysisManagerBase | ( | ) | [inline, protected] |
Definition at line 578 of file IR/PassManager.h.
llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::AnalysisManagerBase | ( | AnalysisManagerBase< DerivedT, IRUnitT > && | Arg | ) | [inline, protected] |
Definition at line 579 of file IR/PassManager.h.
PassT::Result* llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::getCachedResult | ( | IRUnitT | IR | ) | const [inline] |
Get the cached result of an analysis pass for this module.
This method never runs the analysis.
Definition at line 608 of file IR/PassManager.h.
PassT::Result& llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::getResult | ( | IRUnitT | IR | ) | [inline] |
Get the result of an analysis pass for this module.
If there is not a valid cached result in the manager already, this will re-run the analysis to produce a valid result.
Definition at line 591 of file IR/PassManager.h.
Referenced by llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), llvm::LazyCallGraphPrinterPass::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
void llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::invalidate | ( | Module * | M | ) | [inline] |
Invalidate a specific analysis pass for an IR module.
Note that the analysis result can disregard invalidation.
Definition at line 637 of file IR/PassManager.h.
Referenced by llvm::CGSCCPassManager::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::ModulePassManager::run(), llvm::FunctionPassManager::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
void llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::invalidate | ( | IRUnitT | IR, |
const PreservedAnalyses & | PA | ||
) | [inline] |
Invalidate analyses cached for an IR unit.
Walk through all of the analyses pertaining to this unit of IR and invalidate them unless they are preserved by the PreservedAnalyses set.
Definition at line 647 of file IR/PassManager.h.
PassConceptT& llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::lookupPass | ( | void * | PassID | ) | [inline, protected] |
Lookup a registered analysis pass.
Definition at line 653 of file IR/PassManager.h.
const PassConceptT& llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::lookupPass | ( | void * | PassID | ) | const [inline, protected] |
Lookup a registered analysis pass.
Definition at line 661 of file IR/PassManager.h.
AnalysisManagerBase& llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::operator= | ( | AnalysisManagerBase< DerivedT, IRUnitT > && | RHS | ) | [inline, protected] |
Definition at line 581 of file IR/PassManager.h.
void llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::registerPass | ( | PassT | Pass | ) | [inline] |
Register an analysis pass with the manager.
This provides an initialized and set-up analysis pass to the analysis manager. Whomever is setting up analysis passes must use this to populate the manager with all of the analysis passes available.
Definition at line 627 of file IR/PassManager.h.