LLVM API Documentation

Public Member Functions | Protected Types | Protected Member Functions
llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT > Class Template Reference

A CRTP base used to implement analysis managers. More...

#include <PassManager.h>

Inheritance diagram for llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >:
Inheritance graph
[legend]

List of all members.

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)
AnalysisManagerBaseoperator= (AnalysisManagerBase &&RHS)
PassConceptTlookupPass (void *PassID)
 Lookup a registered analysis pass.
const PassConceptTlookupPass (void *PassID) const
 Lookup a registered analysis pass.

Detailed Description

template<typename DerivedT, typename IRUnitT>
class llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >

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.


Member Typedef Documentation

template<typename DerivedT, typename IRUnitT>
typedef detail::AnalysisPassConcept<IRUnitT, DerivedT> llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::PassConceptT [protected]

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

template<typename DerivedT, typename IRUnitT>
typedef detail::AnalysisResultConcept<IRUnitT> llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::ResultConceptT [protected]

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


Constructor & Destructor Documentation

template<typename DerivedT, typename IRUnitT>
llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::AnalysisManagerBase ( ) [inline, protected]

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

template<typename DerivedT, typename IRUnitT>
llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::AnalysisManagerBase ( AnalysisManagerBase< DerivedT, IRUnitT > &&  Arg) [inline, protected]

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


Member Function Documentation

template<typename DerivedT, typename IRUnitT>
template<typename PassT >
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.

Returns:
null if there is no cached result.

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

template<typename DerivedT, typename IRUnitT>
template<typename PassT >
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().

template<typename DerivedT, typename IRUnitT>
template<typename PassT >
void llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::invalidate ( Module M) [inline]
template<typename DerivedT, typename IRUnitT>
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.

template<typename DerivedT, typename IRUnitT>
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.

template<typename DerivedT, typename IRUnitT>
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.

template<typename DerivedT, typename IRUnitT>
AnalysisManagerBase& llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::operator= ( AnalysisManagerBase< DerivedT, IRUnitT > &&  RHS) [inline, protected]

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

template<typename DerivedT, typename IRUnitT>
template<typename PassT >
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.


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