LLVM 18.0.0git
|
A template wrapper used to implement the polymorphic API. More...
#include "llvm/IR/PassManagerInternal.h"
Public Types | |
template<typename T > | |
using | has_required_t = decltype(std::declval< T & >().isRequired()) |
Public Member Functions | |
PassModel (PassT Pass) | |
PassModel (const PassModel &Arg) | |
PassModel (PassModel &&Arg) | |
PassModel & | operator= (PassModel RHS) |
PreservedAnalysesT | run (IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs) override |
The polymorphic API which runs the pass over a given IR entity. | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) override |
StringRef | name () const override |
Polymorphic method to access the name of a pass. | |
bool | isRequired () const override |
Polymorphic method to let a pass optionally exempted from skipping by PassInstrumentation. | |
![]() | |
virtual | ~PassConcept ()=default |
virtual PreservedAnalyses | run (IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)=0 |
The polymorphic API which runs the pass over a given IR entity. | |
virtual void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)=0 |
virtual StringRef | name () const=0 |
Polymorphic method to access the name of a pass. | |
virtual bool | isRequired () const=0 |
Polymorphic method to let a pass optionally exempted from skipping by PassInstrumentation. | |
Static Public Member Functions | |
template<typename T > | |
static std::enable_if_t< is_detected< has_required_t, T >::value, bool > | passIsRequiredImpl () |
template<typename T > | |
static std::enable_if_t<!is_detected< has_required_t, T >::value, bool > | passIsRequiredImpl () |
Public Attributes | |
PassT | Pass |
Friends | |
void | swap (PassModel &LHS, PassModel &RHS) |
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 70 of file PassManagerInternal.h.
using llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::has_required_t = decltype(std::declval<T &>().isRequired()) |
Definition at line 101 of file PassManagerInternal.h.
|
inlineexplicit |
Definition at line 71 of file PassManagerInternal.h.
|
inline |
Definition at line 74 of file PassManagerInternal.h.
|
inline |
Definition at line 75 of file PassManagerInternal.h.
|
inlineoverridevirtual |
Polymorphic method to let a pass optionally exempted from skipping by PassInstrumentation.
To opt-in, pass should implement static bool isRequired()
. It's no-op to have isRequired
always return false since that is the default.
Implements llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs... >.
Definition at line 114 of file PassManagerInternal.h.
|
inlineoverridevirtual |
Polymorphic method to access the name of a pass.
Implements llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs... >.
Definition at line 98 of file PassManagerInternal.h.
|
inline |
Definition at line 82 of file PassManagerInternal.h.
References RHS, and llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::swap.
|
inlinestatic |
Definition at line 105 of file PassManagerInternal.h.
|
inlinestatic |
Definition at line 110 of file PassManagerInternal.h.
|
inlineoverridevirtual |
Implements llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs... >.
Definition at line 92 of file PassManagerInternal.h.
References OS.
|
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 87 of file PassManagerInternal.h.
References IR.
|
friend |
Definition at line 77 of file PassManagerInternal.h.
Referenced by llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::operator=().
PassT llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::Pass |
Definition at line 116 of file PassManagerInternal.h.