LLVM  14.0.0git
Public Member Functions | List of all members
llvm::PassInstrumentation Class Reference

This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks registered in PassInstrumentationCallbacks. More...

#include "llvm/IR/PassInstrumentation.h"

Public Member Functions

 PassInstrumentation (PassInstrumentationCallbacks *CB=nullptr)
 Callbacks object is not owned by PassInstrumentation, its life-time should at least match the life-time of corresponding PassInstrumentationAnalysis (which usually is till the end of current compilation). More...
 
template<typename IRUnitT , typename PassT >
bool runBeforePass (const PassT &Pass, const IRUnitT &IR) const
 BeforePass instrumentation point - takes Pass instance to be executed and constant reference to IR it operates on. More...
 
template<typename IRUnitT , typename PassT >
void runAfterPass (const PassT &Pass, const IRUnitT &IR, const PreservedAnalyses &PA) const
 AfterPass instrumentation point - takes Pass instance that has just been executed and constant reference to IR it operates on. More...
 
template<typename IRUnitT , typename PassT >
void runAfterPassInvalidated (const PassT &Pass, const PreservedAnalyses &PA) const
 AfterPassInvalidated instrumentation point - takes Pass instance that has just been executed. More...
 
template<typename IRUnitT , typename PassT >
void runBeforeAnalysis (const PassT &Analysis, const IRUnitT &IR) const
 BeforeAnalysis instrumentation point - takes Analysis instance to be executed and constant reference to IR it operates on. More...
 
template<typename IRUnitT , typename PassT >
void runAfterAnalysis (const PassT &Analysis, const IRUnitT &IR) const
 AfterAnalysis instrumentation point - takes Analysis instance that has just been executed and constant reference to IR it operated on. More...
 
template<typename IRUnitT , typename PassT >
void runAnalysisInvalidated (const PassT &Analysis, const IRUnitT &IR) const
 AnalysisInvalidated instrumentation point - takes Analysis instance that has just been invalidated and constant reference to IR it operated on. More...
 
void runAnalysesCleared (StringRef Name) const
 AnalysesCleared instrumentation point - takes name of IR that analyses operated on. More...
 
template<typename IRUnitT , typename... ExtraArgsT>
bool invalidate (IRUnitT &, const class llvm::PreservedAnalyses &, ExtraArgsT...)
 Handle invalidation from the pass manager when PassInstrumentation is used as the result of PassInstrumentationAnalysis. More...
 
template<typename CallableT >
void pushBeforeNonSkippedPassCallback (CallableT C)
 
void popBeforeNonSkippedPassCallback ()
 

Detailed Description

This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks registered in PassInstrumentationCallbacks.

Definition at line 180 of file PassInstrumentation.h.

Constructor & Destructor Documentation

◆ PassInstrumentation()

llvm::PassInstrumentation::PassInstrumentation ( PassInstrumentationCallbacks CB = nullptr)
inline

Callbacks object is not owned by PassInstrumentation, its life-time should at least match the life-time of corresponding PassInstrumentationAnalysis (which usually is till the end of current compilation).

Definition at line 208 of file PassInstrumentation.h.

Member Function Documentation

◆ invalidate()

template<typename IRUnitT , typename... ExtraArgsT>
bool llvm::PassInstrumentation::invalidate ( IRUnitT &  ,
const class llvm::PreservedAnalyses ,
ExtraArgsT...   
)
inline

Handle invalidation from the pass manager when PassInstrumentation is used as the result of PassInstrumentationAnalysis.

On attempt to invalidate just return false. There is nothing to become invalid here.

Definition at line 302 of file PassInstrumentation.h.

◆ popBeforeNonSkippedPassCallback()

void llvm::PassInstrumentation::popBeforeNonSkippedPassCallback ( )
inline

Definition at line 312 of file PassInstrumentation.h.

Referenced by llvm::FunctionToLoopPassAdaptor::run().

◆ pushBeforeNonSkippedPassCallback()

template<typename CallableT >
void llvm::PassInstrumentation::pushBeforeNonSkippedPassCallback ( CallableT  C)
inline

◆ runAfterAnalysis()

template<typename IRUnitT , typename PassT >
void llvm::PassInstrumentation::runAfterAnalysis ( const PassT &  Analysis,
const IRUnitT &  IR 
) const
inline

AfterAnalysis instrumentation point - takes Analysis instance that has just been executed and constant reference to IR it operated on.

Definition at line 272 of file PassInstrumentation.h.

References Analysis, and IR.

◆ runAfterPass()

template<typename IRUnitT , typename PassT >
void llvm::PassInstrumentation::runAfterPass ( const PassT &  Pass,
const IRUnitT &  IR,
const PreservedAnalyses PA 
) const
inline

◆ runAfterPassInvalidated()

template<typename IRUnitT , typename PassT >
void llvm::PassInstrumentation::runAfterPassInvalidated ( const PassT &  Pass,
const PreservedAnalyses PA 
) const
inline

◆ runAnalysesCleared()

void llvm::PassInstrumentation::runAnalysesCleared ( StringRef  Name) const
inline

AnalysesCleared instrumentation point - takes name of IR that analyses operated on.

Definition at line 290 of file PassInstrumentation.h.

◆ runAnalysisInvalidated()

template<typename IRUnitT , typename PassT >
void llvm::PassInstrumentation::runAnalysisInvalidated ( const PassT &  Analysis,
const IRUnitT &  IR 
) const
inline

AnalysisInvalidated instrumentation point - takes Analysis instance that has just been invalidated and constant reference to IR it operated on.

Definition at line 282 of file PassInstrumentation.h.

References Analysis, and IR.

Referenced by llvm::AnalysisManager< MachineFunction >::invalidate().

◆ runBeforeAnalysis()

template<typename IRUnitT , typename PassT >
void llvm::PassInstrumentation::runBeforeAnalysis ( const PassT &  Analysis,
const IRUnitT &  IR 
) const
inline

BeforeAnalysis instrumentation point - takes Analysis instance to be executed and constant reference to IR it operates on.

Definition at line 263 of file PassInstrumentation.h.

References Analysis, and IR.

◆ runBeforePass()

template<typename IRUnitT , typename PassT >
bool llvm::PassInstrumentation::runBeforePass ( const PassT &  Pass,
const IRUnitT &  IR 
) const
inline

BeforePass instrumentation point - takes Pass instance to be executed and constant reference to IR it operates on.

\Returns true if pass is allowed to be executed. These are only run on optional pass since required passes must always be run. This allows these callbacks to print info when they want to skip a pass.

Definition at line 217 of file PassInstrumentation.h.

References IR.

Referenced by llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), llvm::FunctionToLoopPassAdaptor::run(), llvm::CGSCCToFunctionPassAdaptor::run(), llvm::PassManager< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >::run(), llvm::DevirtSCCRepeatedPass::run(), llvm::ModuleToFunctionPassAdaptor::run(), llvm::RepeatedPass< PassT >::run(), and llvm::PassManager< Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & >::runSinglePass().


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