|
LLVM 23.0.0git
|
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | ConfigKind { PassAddress = 0 , ReplaceAddress , PassAS , PassDeclaredSize , PassAlignment , PassName , PassInitialValue , PassIsConstant , PassIsDefinition , 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 | |
| GlobalVarIO (bool IsPRE) | |
| 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, 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. | |
| StringRef | Filter |
| A filter expression to be matched against runtime property values. | |
| CallbackTy | CB = nullptr |
Definition at line 748 of file Instrumentor.h.
Definition at line 768 of file Instrumentor.h.
| Enumerator | |
|---|---|
| PassAddress | |
| ReplaceAddress | |
| PassAS | |
| PassDeclaredSize | |
| PassAlignment | |
| PassName | |
| PassInitialValue | |
| PassIsConstant | |
| PassIsDefinition | |
| PassId | |
| NumConfig | |
Definition at line 754 of file Instrumentor.h.
|
inline |
Definition at line 749 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationOpportunity::InstrumentationOpportunity().
Referenced by populate().
|
static |
Definition at line 1310 of file Instrumentor.cpp.
References llvm::cast(), llvm::GlobalValue::getAddressSpace(), llvm::ConstantExpr::getAddrSpaceCast(), and llvm::instrumentor::InstrumentorIRBuilderTy::PtrTy.
Referenced by init().
|
static |
Definition at line 1419 of file Instrumentor.cpp.
References llvm::cast(), and llvm::GlobalVariable::getAlignment().
Referenced by init().
|
static |
Definition at line 1414 of file Instrumentor.cpp.
References llvm::cast(), and llvm::GlobalValue::getAddressSpace().
Referenced by init().
|
static |
Definition at line 1425 of file Instrumentor.cpp.
References llvm::cast(), DL, llvm::GlobalValue::getDataLayout(), and llvm::GlobalValue::getValueType().
Referenced by init().
|
static |
Definition at line 1438 of file Instrumentor.cpp.
References llvm::cast(), llvm::GlobalVariable::getInitializer(), llvm::Constant::getNullValue(), and llvm::GlobalVariable::hasInitializer().
Referenced by init().
|
inlineoverridevirtual |
Get the name of the instrumentation opportunity.
Implements llvm::instrumentor::InstrumentationOpportunity.
Definition at line 771 of file Instrumentor.h.
|
static |
Definition at line 1432 of file Instrumentor.cpp.
References llvm::cast(), llvm::instrumentor::InstrumentationConfig::getGlobalString(), and llvm::Value::getName().
Referenced by init().
| void GlobalVarIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
Definition at line 1268 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationConfig::addChoice(), llvm::instrumentor::InstrumentationOpportunity::addCommonArgs(), Config, llvm::instrumentor::InstrumentorIRBuilderTy::Ctx, getAddress(), getAlignment(), getAS(), getDeclaredSize(), getInitialValue(), llvm::instrumentor::InstrumentationOpportunity::getLocationKind(), getSymbolName(), llvm::instrumentor::IRTArg::INDIRECT_HAS_SIZE, llvm::instrumentor::InstrumentorIRBuilderTy::Int32Ty, llvm::instrumentor::InstrumentorIRBuilderTy::Int64Ty, llvm::instrumentor::InstrumentorIRBuilderTy::Int8Ty, llvm::instrumentor::InstrumentationOpportunity::IRTArgs, isConstant(), isDefinition(), llvm::instrumentor::InstrumentationLocation::isPRE(), llvm::instrumentor::IRTArg::NONE, PassAddress, PassAlignment, PassAS, PassDeclaredSize, PassId, PassInitialValue, PassIsConstant, PassIsDefinition, PassName, llvm::instrumentor::IRTArg::POTENTIALLY_INDIRECT, llvm::instrumentor::InstrumentorIRBuilderTy::PtrTy, llvm::instrumentor::IRTArg::REPLACABLE, ReplaceAddress, setAddress(), and llvm::instrumentor::IRTArg::STRING.
|
static |
Definition at line 1445 of file Instrumentor.cpp.
References llvm::cast(), and llvm::GlobalVariable::isConstant().
Referenced by init().
|
static |
Definition at line 1450 of file Instrumentor.cpp.
References llvm::cast(), and llvm::GlobalValue::isDeclaration().
Referenced by init().
|
inlinestatic |
Definition at line 797 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), and GlobalVarIO().
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
|
static |
Definition at line 1317 of file Instrumentor.cpp.
References llvm::append_range(), llvm::cast(), DL, llvm::Done, llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::instrumentor::InstrumentorIRBuilderTy::Epoch, llvm::PoisonValue::get(), llvm::GlobalValue::getDataLayout(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHIOrDbgOrAlloca(), llvm::Instruction::getFunction(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::instrumentor::InstrumentationConfig::getRTName(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::Value::getType(), I, II, llvm::instrumentor::InstrumentorIRBuilderTy::IRB, llvm::isa(), llvm::GlobalValue::isDeclaration(), llvm::make_pointer_range(), llvm::instrumentor::InstrumentorIRBuilderTy::NewInsts, PHI, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Value::uses(), and llvm::GlobalValue::WeakODRLinkage.
Referenced by init().
| ConfigTy llvm::instrumentor::GlobalVarIO::Config |
Definition at line 769 of file Instrumentor.h.
Referenced by init().