LLVM  8.0.1
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
 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
 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... 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...
 

Detailed Description

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

Definition at line 130 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 138 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 199 of file PassInstrumentation.h.

◆ 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 187 of file PassInstrumentation.h.

References C.

Referenced by llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate().

◆ runAfterPass()

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

◆ runAfterPassInvalidated()

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

AfterPassInvalidated instrumentation point - takes Pass instance that has just been executed.

For use when IR has been invalidated by Pass execution.

Definition at line 169 of file PassInstrumentation.h.

References C.

Referenced by llvm::PassManager< Function >::run(), llvm::FunctionToLoopPassAdaptor< LoopPassT >::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), and llvm::DevirtSCCRepeatedPass< PassT >::run().

◆ 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 178 of file PassInstrumentation.h.

References C.

Referenced by llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate().

◆ runBeforePass()

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

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