|
LLVM 23.0.0git
|
The instrumentation opportunity for load instructions. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | ConfigKind { PassPointer = 0 , ReplacePointer , PassPointerAS , PassValue , ReplaceValue , PassValueSize , PassAlignment , PassValueTypeId , PassAtomicityOrdering , PassSyncScopeId , PassIsVolatile , PassId , NumConfig } |
| The selector of arguments for load 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 | ~LoadIO () |
| LoadIO (bool IsPRE) | |
| Construct a load opportunity. | |
| virtual Type * | getValueType (InstrumentorIRBuilderTy &IIRB) const |
| } | |
| void | init (InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, ConfigTy *UserConfig=nullptr) |
Initialize the load opportunity using the instrumentation config IConf and the user config UserConfig. | |
| Public Member Functions inherited from llvm::instrumentor::InstructionIO< Instruction::Load > | |
| 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 load instructions.
Definition at line 604 of file Instrumentor.h.
Definition at line 628 of file Instrumentor.h.
The selector of arguments for load opportunities.
{
| Enumerator | |
|---|---|
| PassPointer | |
| ReplacePointer | |
| PassPointerAS | |
| PassValue | |
| ReplaceValue | |
| PassValueSize | |
| PassAlignment | |
| PassValueTypeId | |
| PassAtomicityOrdering | |
| PassSyncScopeId | |
| PassIsVolatile | |
| PassId | |
| NumConfig | |
Definition at line 612 of file Instrumentor.h.
|
inlinevirtual |
Definition at line 605 of file Instrumentor.h.
|
inline |
Construct a load opportunity.
Definition at line 608 of file Instrumentor.h.
References llvm::instrumentor::InstructionIO< Instruction::Load >::InstructionIO().
Referenced by populate().
|
static |
|
static |
|
static |
Getters and setters for the arguments of the instrumentation function for the load opportunity.
{
Definition at line 707 of file Instrumentor.cpp.
References llvm::cast().
Referenced by init().
|
static |
|
static |
|
static |
Definition at line 726 of file Instrumentor.cpp.
Referenced by init().
|
static |
Definition at line 731 of file Instrumentor.cpp.
References llvm::cast(), and DL.
Referenced by init().
|
inlinevirtual |
}
Get the type of the loaded value.
Definition at line 633 of file Instrumentor.h.
References llvm::instrumentor::InstrumentorIRBuilderTy::Int64Ty.
Referenced by init().
|
static |
| void LoadIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
Initialize the load opportunity using the instrumentation config IConf and the user config UserConfig.
Definition at line 645 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, PassSyncScopeId, PassValue, PassValueSize, PassValueTypeId, llvm::instrumentor::IRTArg::POTENTIALLY_INDIRECT, llvm::instrumentor::InstrumentorIRBuilderTy::PtrTy, llvm::instrumentor::IRTArg::REPLACABLE, ReplacePointer, ReplaceValue, llvm::instrumentor::InstrumentationOpportunity::replaceValue(), and setPointer().
|
static |
|
inlinestatic |
}
Create the store opportunities for PRE and POST positions.
Definition at line 669 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), and LoadIO().
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
|
static |
| ConfigTy llvm::instrumentor::LoadIO::Config |
Definition at line 629 of file Instrumentor.h.
Referenced by init().