class PassInstrumentation
Declaration
class PassInstrumentation { /* full declaration omitted */ };
Description
This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks registered in PassInstrumentationCallbacks.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:129
Method Overview
- public PassInstrumentation(llvm::PassInstrumentationCallbacks * CB = nullptr)
- public template <typename IRUnitT, typename... ExtraArgsT>bool invalidate(IRUnitT &, const class llvm::PreservedAnalyses &, ExtraArgsT...)
- public template <typename IRUnitT, typename PassT>void runAfterAnalysis(const PassT & Analysis, const IRUnitT & IR) const
- public template <typename IRUnitT, typename PassT>void runAfterPass(const PassT & Pass, const IRUnitT & IR) const
- public template <typename IRUnitT, typename PassT>void runAfterPassInvalidated(const PassT & Pass) const
- public template <typename IRUnitT, typename PassT>void runBeforeAnalysis(const PassT & Analysis, const IRUnitT & IR) const
- public template <typename IRUnitT, typename PassT>bool runBeforePass(const PassT & Pass, const IRUnitT & IR) const
Methods
¶PassInstrumentation(
llvm::PassInstrumentationCallbacks* CB =
nullptr)
PassInstrumentation(
llvm::PassInstrumentationCallbacks* CB =
nullptr)
Description
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).
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:137
Parameters
- llvm::PassInstrumentationCallbacks* CB = nullptr
¶template <typename IRUnitT,
typename... ExtraArgsT>
bool invalidate(
IRUnitT&,
const class llvm::PreservedAnalyses&,
ExtraArgsT...)
template <typename IRUnitT,
typename... ExtraArgsT>
bool invalidate(
IRUnitT&,
const class llvm::PreservedAnalyses&,
ExtraArgsT...)
Description
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.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:198
Templates
- IRUnitT
- ExtraArgsT
Parameters
- IRUnitT&
- const class llvm::PreservedAnalyses&
- ExtraArgsT...
¶template <typename IRUnitT, typename PassT>
void runAfterAnalysis(const PassT& Analysis,
const IRUnitT& IR) const
template <typename IRUnitT, typename PassT>
void runAfterAnalysis(const PassT& Analysis,
const IRUnitT& IR) const
Description
AfterAnalysis instrumentation point - takes \p Analysis instance that has just been executed and constant reference to IR it operated on.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:186
Templates
- IRUnitT
- PassT
Parameters
- const PassT& Analysis
- const IRUnitT& IR
¶template <typename IRUnitT, typename PassT>
void runAfterPass(const PassT& Pass,
const IRUnitT& IR) const
template <typename IRUnitT, typename PassT>
void runAfterPass(const PassT& Pass,
const IRUnitT& IR) const
Description
AfterPass instrumentation point - takes \p Pass instance that has just been executed and constant reference to \p IR it operates on.\p IR is guaranteed to be valid at this point.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:158
Templates
- IRUnitT
- PassT
Parameters
- const PassT& Pass
- const IRUnitT& IR
¶template <typename IRUnitT, typename PassT>
void runAfterPassInvalidated(
const PassT& Pass) const
template <typename IRUnitT, typename PassT>
void runAfterPassInvalidated(
const PassT& Pass) const
Description
AfterPassInvalidated instrumentation point - takes \p Pass instance that has just been executed. For use when IR has been invalidated by \p Pass execution.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:168
Templates
- IRUnitT
- PassT
Parameters
- const PassT& Pass
¶template <typename IRUnitT, typename PassT>
void runBeforeAnalysis(const PassT& Analysis,
const IRUnitT& IR) const
template <typename IRUnitT, typename PassT>
void runBeforeAnalysis(const PassT& Analysis,
const IRUnitT& IR) const
Description
BeforeAnalysis instrumentation point - takes \p Analysis instance to be executed and constant reference to IR it operates on.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:177
Templates
- IRUnitT
- PassT
Parameters
- const PassT& Analysis
- const IRUnitT& IR
¶template <typename IRUnitT, typename PassT>
bool runBeforePass(const PassT& Pass,
const IRUnitT& IR) const
template <typename IRUnitT, typename PassT>
bool runBeforePass(const PassT& Pass,
const IRUnitT& IR) const
Description
BeforePass instrumentation point - takes \p Pass instance to be executed and constant reference to IR it operates on.
Declared at: llvm/include/llvm/IR/PassInstrumentation.h:144
Templates
- IRUnitT
- PassT
Parameters
- const PassT& Pass
- const IRUnitT& IR
Returns
true if pass is allowed to be executed.