LLVM 20.0.0git
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs > Struct Template Reference

Wrapper to model the analysis pass concept. More...

#include "llvm/IR/PassManagerInternal.h"

Inheritance diagram for llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >:
Inheritance graph
[legend]

Public Types

using ResultModelT = AnalysisResultModel< IRUnitT, PassT, typename PassT::Result, InvalidatorT >
 

Public Member Functions

 AnalysisPassModel (PassT Pass)
 
 AnalysisPassModel (const AnalysisPassModel &Arg)
 
 AnalysisPassModel (AnalysisPassModel &&Arg)
 
AnalysisPassModeloperator= (AnalysisPassModel RHS)
 
std::unique_ptr< AnalysisResultConcept< IRUnitT, InvalidatorT > > run (IRUnitT &IR, AnalysisManager< IRUnitT, ExtraArgTs... > &AM, ExtraArgTs... ExtraArgs) override
 The model delegates to the PassT::run method.
 
StringRef name () const override
 The model delegates to a static PassT::name method.
 
- Public Member Functions inherited from llvm::detail::AnalysisPassConcept< IRUnitT, InvalidatorT, ExtraArgTs... >
virtual ~AnalysisPassConcept ()=default
 
virtual std::unique_ptr< AnalysisResultConcept< IRUnitT, InvalidatorT > > run (IRUnitT &IR, AnalysisManager< IRUnitT, ExtraArgTs... > &AM, ExtraArgTs... ExtraArgs)=0
 Method to run this analysis over a unit of IR.
 
virtual StringRef name () const=0
 Polymorphic method to access the name of a pass.
 

Public Attributes

PassT Pass
 

Friends

void swap (AnalysisPassModel &LHS, AnalysisPassModel &RHS)
 

Detailed Description

template<typename IRUnitT, typename PassT, typename InvalidatorT, typename... ExtraArgTs>
struct llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >

Wrapper to model the analysis pass concept.

Can wrap any type which implements a suitable run method. The method must accept an IRUnitT& and an AnalysisManager<IRUnitT>& as arguments and produce an object which can be wrapped in a AnalysisResultModel.

Definition at line 291 of file PassManagerInternal.h.

Member Typedef Documentation

◆ ResultModelT

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
using llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::ResultModelT = AnalysisResultModel<IRUnitT, PassT, typename PassT::Result, InvalidatorT>

Definition at line 310 of file PassManagerInternal.h.

Constructor & Destructor Documentation

◆ AnalysisPassModel() [1/3]

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::AnalysisPassModel ( PassT  Pass)
inlineexplicit

Definition at line 293 of file PassManagerInternal.h.

◆ AnalysisPassModel() [2/3]

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::AnalysisPassModel ( const AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs > &  Arg)
inline

Definition at line 296 of file PassManagerInternal.h.

◆ AnalysisPassModel() [3/3]

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::AnalysisPassModel ( AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs > &&  Arg)
inline

Definition at line 297 of file PassManagerInternal.h.

Member Function Documentation

◆ name()

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
StringRef llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::name ( ) const
inlineoverridevirtual

The model delegates to a static PassT::name method.

The returned string ref must point to constant immutable data!

Implements llvm::detail::AnalysisPassConcept< IRUnitT, InvalidatorT, ExtraArgTs... >.

Definition at line 326 of file PassManagerInternal.h.

◆ operator=()

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
AnalysisPassModel & llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::operator= ( AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >  RHS)
inline

◆ run()

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
std::unique_ptr< AnalysisResultConcept< IRUnitT, InvalidatorT > > llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::run ( IRUnitT &  IR,
AnalysisManager< IRUnitT, ExtraArgTs... > &  AM,
ExtraArgTs...  ExtraArgs 
)
inlineoverridevirtual

The model delegates to the PassT::run method.

The return is wrapped in an AnalysisResultModel.

Implements llvm::detail::AnalysisPassConcept< IRUnitT, InvalidatorT, ExtraArgTs... >.

Definition at line 317 of file PassManagerInternal.h.

References IR.

Friends And Related Function Documentation

◆ swap

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
void swap ( AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs > &  LHS,
AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs > &  RHS 
)
friend

Member Data Documentation

◆ Pass

template<typename IRUnitT , typename PassT , typename InvalidatorT , typename... ExtraArgTs>
PassT llvm::detail::AnalysisPassModel< IRUnitT, PassT, InvalidatorT, ExtraArgTs >::Pass

Definition at line 328 of file PassManagerInternal.h.


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