|
LLVM 23.0.0git
|
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | ConfigKind { PassPointer = 0 , PassPointerKind , PassId , NumConfig } |
| using | ConfigTy = BaseConfigTy<ConfigKind> |
| Public Types inherited from llvm::instrumentor::InstrumentationOpportunity | |
| using | CallbackTy = std::function<bool(Value &)> |
| An optional callback that takes the value that is about to be instrumented and can return false if it should be skipped. | |
Public Member Functions | |
| BasePointerIO () | |
| virtual | ~BasePointerIO () |
| StringRef | getName () const override |
| Get the name of the instrumentation opportunity. | |
| void | init (InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, ConfigTy *UserConfig=nullptr) |
| Public Member Functions inherited from llvm::instrumentor::InstrumentationOpportunity | |
| virtual | ~InstrumentationOpportunity () |
| InstrumentationOpportunity (const InstrumentationLocation IP) | |
Construct an opportunity with location IP. | |
| virtual Value * | instrument (Value *&V, bool &Changed, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, InstrumentationCaches &ICaches) |
| } | |
| virtual Type * | getRetTy (LLVMContext &Ctx) const |
| Get the return type for the instrumentation runtime function. | |
| virtual ArrayRef< unsigned > | getAllOpcodes () const |
| Get all opcodes for this instrumentation opportunity. | |
| InstrumentationLocation::KindTy | getLocationKind () const |
| Get the location kind of the instrumentation opportunity. | |
| void | addCommonArgs (InstrumentationConfig &IConf, LLVMContext &Ctx, bool PassId) |
| } | |
Static Public Member Functions | |
| static Value * | getPointerKind (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static Value * | setValueNoop (Value &V, Value &NewV, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| This is necessary to produce a return value that can be used by other IOs. | |
| static void | populate (InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| Static Public Member Functions inherited from llvm::instrumentor::InstrumentationOpportunity | |
| static Value * | forceCast (Value &V, Type &Ty, InstrumentorIRBuilderTy &IIRB) |
| Helpers to cast values, pass them to the runtime, and replace them. | |
| static Value * | getValue (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static Value * | replaceValue (Value &V, Value &NewV, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static Value * | getIdPre (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| Get the opportunity identifier for the pre and post positions. | |
| static Value * | getIdPost (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static int32_t | getIdFromEpoch (uint32_t CurrentEpoch) |
| } | |
Public Attributes | |
| ConfigTy | Config |
| Public Attributes inherited from llvm::instrumentor::InstrumentationOpportunity | |
| InstrumentationLocation | IP |
| The instrumentation location of the opportunity. | |
| SmallVector< IRTArg > | IRTArgs |
| The list of possible arguments for the instrumentation runtime function. | |
| bool | Enabled = true |
| Whether the opportunity is enabled. | |
| StringRef | Filter |
| A filter expression to be matched against runtime property values. | |
| CallbackTy | CB = nullptr |
Definition at line 735 of file Instrumentor.h.
Definition at line 748 of file Instrumentor.h.
| Enumerator | |
|---|---|
| PassPointer | |
| PassPointerKind | |
| PassId | |
| NumConfig | |
Definition at line 741 of file Instrumentor.h.
|
inline |
Definition at line 736 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationOpportunity::InstrumentationOpportunity().
Referenced by populate().
|
inlinevirtual |
Definition at line 739 of file Instrumentor.h.
|
inlineoverridevirtual |
Get the name of the instrumentation opportunity.
Implements llvm::instrumentor::InstrumentationOpportunity.
Definition at line 751 of file Instrumentor.h.
|
static |
| void BasePointerIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
Definition at line 1371 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationConfig::addChoice(), llvm::instrumentor::InstrumentationOpportunity::addCommonArgs(), Config, llvm::instrumentor::InstrumentorIRBuilderTy::Ctx, getPointerKind(), llvm::instrumentor::InstrumentationOpportunity::getValue(), llvm::instrumentor::InstrumentorIRBuilderTy::Int32Ty, llvm::instrumentor::InstrumentationOpportunity::IRTArgs, llvm::instrumentor::IRTArg::NONE, PassId, PassPointer, PassPointerKind, llvm::instrumentor::InstrumentorIRBuilderTy::PtrTy, llvm::instrumentor::IRTArg::REPLACABLE, and setValueNoop().
|
inlinestatic |
Definition at line 767 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), and BasePointerIO().
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
|
inlinestatic |
This is necessary to produce a return value that can be used by other IOs.
No replacement is actually happening.
Definition at line 761 of file Instrumentor.h.
Referenced by init().
| ConfigTy llvm::instrumentor::BasePointerIO::Config |
Definition at line 749 of file Instrumentor.h.
Referenced by init().