|
LLVM 22.0.0git
|
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). | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void | runAnalysesCleared (StringRef Name) const |
| AnalysesCleared instrumentation point - takes name of IR that analyses operated on. | |
| 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. | |
| template<typename CallableT> | |
| void | pushBeforeNonSkippedPassCallback (CallableT C) |
| void | popBeforeNonSkippedPassCallback () |
| StringRef | getPassNameForClassName (StringRef ClassName) const |
| Get the pass name for a given pass class name. | |
This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks registered in PassInstrumentationCallbacks.
Definition at line 206 of file PassInstrumentation.h.
|
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 229 of file PassInstrumentation.h.
Get the pass name for a given pass class name.
Definition at line 339 of file PassInstrumentation.h.
Referenced by llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run().
|
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 323 of file PassInstrumentation.h.
|
inline |
Definition at line 333 of file PassInstrumentation.h.
Referenced by llvm::FunctionToLoopPassAdaptor::run().
|
inline |
Definition at line 329 of file PassInstrumentation.h.
References llvm::CallingConv::C.
Referenced by llvm::FunctionToLoopPassAdaptor::run().
|
inline |
AfterAnalysis instrumentation point - takes Analysis instance that has just been executed and constant reference to IR it operated on.
Definition at line 293 of file PassInstrumentation.h.
References Analysis, llvm::CallingConv::C, and IR.
|
inline |
AfterPass instrumentation point - takes Pass instance that has just been executed and constant reference to IR it operates on.
IR is guaranteed to be valid at this point.
Definition at line 263 of file PassInstrumentation.h.
References llvm::CallingConv::C, and IR.
Referenced by llvm::CGSCCToFunctionPassAdaptor::run(), llvm::DevirtSCCRepeatedPass::run(), llvm::FunctionToLoopPassAdaptor::run(), llvm::FunctionToMachineFunctionPassAdaptor::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), and llvm::PassManager< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >::run().
|
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 274 of file PassInstrumentation.h.
References llvm::CallingConv::C.
Referenced by llvm::DevirtSCCRepeatedPass::run(), llvm::FunctionToLoopPassAdaptor::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), and llvm::PassManager< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >::run().
|
inline |
AnalysesCleared instrumentation point - takes name of IR that analyses operated on.
Definition at line 311 of file PassInstrumentation.h.
References llvm::CallingConv::C.
|
inline |
AnalysisInvalidated instrumentation point - takes Analysis instance that has just been invalidated and constant reference to IR it operated on.
Definition at line 303 of file PassInstrumentation.h.
References Analysis, llvm::CallingConv::C, and IR.
Referenced by llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate().
|
inline |
BeforeAnalysis instrumentation point - takes Analysis instance to be executed and constant reference to IR it operates on.
Definition at line 284 of file PassInstrumentation.h.
References Analysis, llvm::CallingConv::C, and IR.
|
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 238 of file PassInstrumentation.h.
References llvm::CallingConv::C, and IR.
Referenced by llvm::CGSCCToFunctionPassAdaptor::run(), llvm::DevirtSCCRepeatedPass::run(), llvm::FunctionToLoopPassAdaptor::run(), llvm::FunctionToMachineFunctionPassAdaptor::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), and llvm::PassManager< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >::run().