LLVM  8.0.1
Public Member Functions | Public Attributes | Friends | List of all members
llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs > Struct Template Reference

A template wrapper used to implement the polymorphic API. More...

#include "llvm/IR/PassManagerInternal.h"

Inheritance diagram for llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >:
Inheritance graph
[legend]
Collaboration diagram for llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >:
Collaboration graph
[legend]

Public Member Functions

 PassModel (PassT Pass)
 
 PassModel (const PassModel &Arg)
 
 PassModel (PassModel &&Arg)
 
PassModeloperator= (PassModel RHS)
 
PreservedAnalysesT run (IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs) override
 The polymorphic API which runs the pass over a given IR entity. More...
 
StringRef name () const override
 Polymorphic method to access the name of a pass. More...
 
- Public Member Functions inherited from llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs... >
virtual ~PassConcept ()=default
 

Public Attributes

PassT Pass
 

Friends

void swap (PassModel &LHS, PassModel &RHS)
 

Detailed Description

template<typename IRUnitT, typename PassT, typename PreservedAnalysesT, typename AnalysisManagerT, typename... ExtraArgTs>
struct llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >

A template wrapper used to implement the polymorphic API.

Can be instantiated for any object which provides a run method accepting an IRUnitT& and an AnalysisManager<IRUnit>&. It requires the pass to be a copyable object.

Definition at line 61 of file PassManagerInternal.h.

Constructor & Destructor Documentation

◆ PassModel() [1/3]

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::PassModel ( PassT  Pass)
inlineexplicit

Definition at line 62 of file PassManagerInternal.h.

◆ PassModel() [2/3]

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::PassModel ( const PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs > &  Arg)
inline

Definition at line 65 of file PassManagerInternal.h.

◆ PassModel() [3/3]

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::PassModel ( PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs > &&  Arg)
inline

Definition at line 66 of file PassManagerInternal.h.

Member Function Documentation

◆ name()

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
StringRef llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::name ( ) const
inlineoverridevirtual

Polymorphic method to access the name of a pass.

Implements llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs... >.

Definition at line 83 of file PassManagerInternal.h.

References name.

◆ operator=()

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
PassModel& llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::operator= ( PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >  RHS)
inline

Definition at line 73 of file PassManagerInternal.h.

References std::swap().

◆ run()

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
PreservedAnalysesT llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::run ( IRUnitT &  IR,
AnalysisManagerT &  AM,
ExtraArgTs...  ExtraArgs 
)
inlineoverridevirtual

The polymorphic API which runs the pass over a given IR entity.

Note that actual pass object can omit the analysis manager argument if desired. Also that the analysis manager may be null if there is no analysis manager in the pass pipeline.

Implements llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs... >.

Definition at line 78 of file PassManagerInternal.h.

Friends And Related Function Documentation

◆ swap

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
void swap ( PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs > &  LHS,
PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs > &  RHS 
)
friend

Definition at line 68 of file PassManagerInternal.h.

Member Data Documentation

◆ Pass

template<typename IRUnitT , typename PassT , typename PreservedAnalysesT , typename AnalysisManagerT , typename... ExtraArgTs>
PassT llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::Pass

Definition at line 85 of file PassManagerInternal.h.


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