LLVM 20.0.0git
Public Member Functions | List of all members
llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs > Struct Template Referenceabstract

Template for the abstract base class used to dispatch polymorphically over pass objects. More...

#include "llvm/IR/PassManagerInternal.h"

Inheritance diagram for llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >:
Inheritance graph
[legend]

Public Member Functions

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.
 

Detailed Description

template<typename IRUnitT, typename AnalysisManagerT, typename... ExtraArgTs>
struct llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >

Template for the abstract base class used to dispatch polymorphically over pass objects.

Definition at line 39 of file PassManagerInternal.h.

Constructor & Destructor Documentation

◆ ~PassConcept()

template<typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
virtual llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >::~PassConcept ( )
virtualdefault

Member Function Documentation

◆ isRequired()

template<typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
virtual bool llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >::isRequired ( ) const
pure virtual

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.

Implemented in llvm::detail::PassModel< IRUnitT, PassT, AnalysisManagerT, ExtraArgTs >.

◆ name()

template<typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
virtual StringRef llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >::name ( ) const
pure virtual

Polymorphic method to access the name of a pass.

Implemented in llvm::detail::PassModel< IRUnitT, PassT, AnalysisManagerT, ExtraArgTs >.

◆ printPipeline()

template<typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
virtual void llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 
)
pure virtual

◆ run()

template<typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
virtual PreservedAnalyses llvm::detail::PassConcept< IRUnitT, AnalysisManagerT, ExtraArgTs >::run ( IRUnitT &  IR,
AnalysisManagerT &  AM,
ExtraArgTs...  ExtraArgs 
)
pure virtual

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.

Implemented in llvm::detail::PassModel< IRUnitT, PassT, AnalysisManagerT, ExtraArgTs >.


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