|
LLVM
3.7.0
|
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. More... | |
| template<typename PassT > | |
| PassT::Result * | getCachedResult (IRUnitT &IR) const |
| Get the cached result of an analysis pass for this module. More... | |
| template<typename PassT > | |
| void | registerPass (PassT Pass) |
| Register an analysis pass with the manager. More... | |
| template<typename PassT > | |
| void | invalidate (IRUnitT &IR) |
| Invalidate a specific analysis pass for an IR module. More... | |
| PreservedAnalyses | invalidate (IRUnitT &IR, PreservedAnalyses PA) |
| Invalidate analyses cached for an IR unit. More... | |
Protected Types | |
| typedef detail::AnalysisResultConcept < IRUnitT > | ResultConceptT |
| typedef detail::AnalysisPassConcept < IRUnitT > | PassConceptT |
Protected Member Functions | |
| AnalysisManagerBase () | |
| AnalysisManagerBase (AnalysisManagerBase &&Arg) | |
| AnalysisManagerBase & | operator= (AnalysisManagerBase &&RHS) |
| PassConceptT & | lookupPass (void *PassID) |
| Lookup a registered analysis pass. More... | |
| const PassConceptT & | lookupPass (void *PassID) const |
| Lookup a registered analysis pass. More... | |
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.
Note that there is also a generic analysis manager template which implements the above required functions along with common datastructures used for managing analyses. This base class is factored so that if you need to customize the handling of a specific IR unit, you can do so without replicating all of the boilerplate.
Definition at line 279 of file PassManager.h.
|
protected |
Definition at line 291 of file PassManager.h.
|
protected |
Definition at line 290 of file PassManager.h.
|
inlineprotected |
Definition at line 298 of file PassManager.h.
|
inlineprotected |
Definition at line 299 of file PassManager.h.
|
inline |
Get the cached result of an analysis pass for this module.
This method never runs the analysis.
Definition at line 328 of file PassManager.h.
Referenced by llvm::InstCombinePass::run().
|
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 311 of file PassManager.h.
Referenced by llvm::EarlyCSEPass::run(), llvm::InstCombinePass::run(), llvm::SimplifyCFGPass::run(), llvm::AssumptionPrinterPass::run(), llvm::DominatorTreePrinterPass::run(), llvm::DominatorTreeVerifierPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), llvm::LazyCallGraphPrinterPass::run(), llvm::LoopAnalysis::run(), llvm::LoopPrinterPass::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
|
inline |
Invalidate a specific analysis pass for an IR module.
Note that the analysis result can disregard invalidation.
Definition at line 357 of file PassManager.h.
Referenced by llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), and llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::run().
|
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. We accept the PreservedAnalyses set by value and update it with each analyis pass which has been successfully invalidated and thus can be preserved going forward. The updated set is returned.
Definition at line 370 of file PassManager.h.
|
inlineprotected |
Lookup a registered analysis pass.
Definition at line 376 of file PassManager.h.
|
inlineprotected |
Lookup a registered analysis pass.
Definition at line 384 of file PassManager.h.
|
inlineprotected |
Definition at line 301 of file PassManager.h.
|
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 347 of file PassManager.h.
1.8.6