|
LLVM 23.0.0git
|
The instrumentation opportunity for store instructions. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | ConfigKind { PassPointer = 0 , ReplacePointer , PassPointerAS , PassStoredValue , PassStoredValueSize , PassAlignment , PassValueTypeId , PassAtomicityOrdering , PassSyncScopeId , PassIsVolatile , PassId , NumConfig } |
| The selector of arguments for store opportunities. More... | |
| 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 | |
| virtual | ~StoreIO () |
| StoreIO (bool IsPRE) | |
| Construct a store instruction opportunity. | |
| virtual Type * | getValueType (InstrumentorIRBuilderTy &IIRB) const |
| } | |
| void | init (InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, ConfigTy *UserConfig=nullptr) |
Initialize the store opportunity using the instrumentation config IConf and the user config UserConfig. | |
| Public Member Functions inherited from llvm::instrumentor::InstructionIO< Instruction::Store > | |
| virtual | ~InstructionIO () |
| InstructionIO (bool IsPRE) | |
| Construct an instruction opportunity. | |
| StringRef | getName () const override |
| Get the name of the instruction. | |
| 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, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, InstrumentationCaches &ICaches) |
| } | |
| virtual Type * | getRetTy (LLVMContext &Ctx) const |
| Get the return type for the instrumentation runtime function. | |
| unsigned | getOpcode () const |
| Get the opcode of the instruction instrumentation opportunity. | |
| InstrumentationLocation::KindTy | getLocationKind () const |
| Get the location kind of the instrumentation opportunity. | |
| void | addCommonArgs (InstrumentationConfig &IConf, LLVMContext &Ctx, bool PassId) |
| } | |
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. | |
| CallbackTy | CB = nullptr |
The instrumentation opportunity for store instructions.
Definition at line 528 of file Instrumentor.h.
Definition at line 551 of file Instrumentor.h.
The selector of arguments for store opportunities.
{
| Enumerator | |
|---|---|
| PassPointer | |
| ReplacePointer | |
| PassPointerAS | |
| PassStoredValue | |
| PassStoredValueSize | |
| PassAlignment | |
| PassValueTypeId | |
| PassAtomicityOrdering | |
| PassSyncScopeId | |
| PassIsVolatile | |
| PassId | |
| NumConfig | |
Definition at line 536 of file Instrumentor.h.
|
inlinevirtual |
Definition at line 529 of file Instrumentor.h.
|
inline |
Construct a store instruction opportunity.
Definition at line 532 of file Instrumentor.h.
References llvm::instrumentor::InstructionIO< Instruction::Store >::InstructionIO().
Referenced by populate().
|
static |
|
static |
|
static |
Getters and setters for the arguments of the instrumentation function for the store opportunity.
{
Definition at line 582 of file Instrumentor.cpp.
References llvm::cast().
Referenced by init().
|
static |
|
static |
|
static |
|
static |
Definition at line 607 of file Instrumentor.cpp.
References llvm::cast(), and DL.
Referenced by init().
|
inlinevirtual |
}
Get the type of the stored value.
Definition at line 556 of file Instrumentor.h.
References llvm::instrumentor::InstrumentorIRBuilderTy::Int64Ty.
Referenced by init().
|
static |
| void StoreIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
Initialize the store opportunity using the instrumentation config IConf and the user config UserConfig.
Definition at line 521 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationConfig::addChoice(), llvm::instrumentor::InstrumentationOpportunity::addCommonArgs(), Config, llvm::instrumentor::InstrumentorIRBuilderTy::Ctx, getAlignment(), getAtomicityOrdering(), llvm::instrumentor::InstrumentationOpportunity::getLocationKind(), getPointer(), getPointerAS(), getSyncScopeId(), getValue(), getValueSize(), getValueType(), getValueTypeId(), llvm::instrumentor::IRTArg::INDIRECT_HAS_SIZE, llvm::instrumentor::InstrumentationLocation::INSTRUCTION_PRE, llvm::instrumentor::InstrumentorIRBuilderTy::Int32Ty, llvm::instrumentor::InstrumentorIRBuilderTy::Int64Ty, llvm::instrumentor::InstrumentorIRBuilderTy::Int8Ty, llvm::instrumentor::InstrumentationOpportunity::IRTArgs, isVolatile(), llvm::instrumentor::IRTArg::NONE, PassAlignment, PassAtomicityOrdering, PassId, PassIsVolatile, PassPointer, PassPointerAS, PassStoredValue, PassStoredValueSize, PassSyncScopeId, PassValueTypeId, llvm::instrumentor::IRTArg::POTENTIALLY_INDIRECT, llvm::instrumentor::InstrumentorIRBuilderTy::PtrTy, llvm::instrumentor::IRTArg::REPLACABLE, ReplacePointer, and setPointer().
|
static |
|
inlinestatic |
}
Create the store opportunities for pre and post positions. The opportunities are also initialized with the arguments for their instrumentation calls.
Definition at line 594 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), and StoreIO().
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
|
static |
| ConfigTy llvm::instrumentor::StoreIO::Config |
Definition at line 552 of file Instrumentor.h.
Referenced by init().