|
LLVM 23.0.0git
|
The instrumentation opportunity for functions. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Classes | |
| struct | ConfigTy |
Public Types | |
| enum | ConfigKind { PassAddress = 0 , PassName , PassNumArguments , PassArguments , ReplaceArguments , PassIsMain , PassId , NumConfig } |
| 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 Attributes | |
| llvm::instrumentor::FunctionIO::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 |
The instrumentation opportunity for functions.
Definition at line 600 of file Instrumentor.h.
| Enumerator | |
|---|---|
| PassAddress | |
| PassName | |
| PassNumArguments | |
| PassArguments | |
| ReplaceArguments | |
| PassIsMain | |
| PassId | |
| NumConfig | |
Definition at line 607 of file Instrumentor.h.
|
inline |
Definition at line 601 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationOpportunity::InstrumentationOpportunity().
Referenced by populate().
| Value * FunctionIO::getArguments | ( | Value & | V, |
| Type & | Ty, | ||
| InstrumentationConfig & | IConf, | ||
| InstrumentorIRBuilderTy & | IIRB ) |
Definition at line 873 of file Instrumentor.cpp.
References llvm::Function::args(), llvm::cast(), Config, createValuePack(), and llvm::make_filter_range().
Referenced by init().
|
static |
Definition at line 847 of file Instrumentor.cpp.
References llvm::cast(), llvm::Constant::getNullValue(), and llvm::Function::isIntrinsic().
Referenced by init().
|
static |
Definition at line 855 of file Instrumentor.cpp.
References llvm::cast(), llvm::demangle(), llvm::instrumentor::InstrumentationConfig::DemangleFunctionNames, llvm::instrumentor::InstrumentationConfig::getGlobalString(), and llvm::Value::getName().
Referenced by init().
|
inlineoverridevirtual |
Get the name of the instrumentation opportunity.
Implements llvm::instrumentor::InstrumentationOpportunity.
Definition at line 624 of file Instrumentor.h.
| Value * FunctionIO::getNumArguments | ( | Value & | V, |
| Type & | Ty, | ||
| InstrumentationConfig & | IConf, | ||
| InstrumentorIRBuilderTy & | IIRB ) |
Definition at line 864 of file Instrumentor.cpp.
References llvm::Function::arg_size(), llvm::Function::args(), llvm::cast(), Config, and llvm::make_filter_range().
Referenced by init().
| void FunctionIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
FunctionIO {.
Definition at line 814 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationConfig::addChoice(), llvm::instrumentor::InstrumentationOpportunity::addCommonArgs(), Config, llvm::instrumentor::InstrumentorIRBuilderTy::Ctx, llvm::instrumentor::InstrumentationLocation::FUNCTION_PRE, getArguments(), getFunctionAddress(), getFunctionName(), llvm::instrumentor::InstrumentationOpportunity::getLocationKind(), getNumArguments(), llvm::instrumentor::InstrumentorIRBuilderTy::Int32Ty, llvm::instrumentor::InstrumentorIRBuilderTy::Int8Ty, llvm::instrumentor::InstrumentationOpportunity::IRTArgs, isMainFunction(), llvm::instrumentor::IRTArg::NONE, PassAddress, PassArguments, PassId, PassIsMain, PassName, PassNumArguments, llvm::instrumentor::InstrumentorIRBuilderTy::PtrTy, llvm::instrumentor::IRTArg::REPLACABLE_CUSTOM, ReplaceArguments, setArguments(), and llvm::instrumentor::IRTArg::STRING.
|
static |
Definition at line 902 of file Instrumentor.cpp.
References llvm::cast(), and llvm::Value::getName().
Referenced by init().
|
inlinestatic |
Definition at line 644 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), and FunctionIO().
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
| Value * FunctionIO::setArguments | ( | Value & | V, |
| Value & | NewV, | ||
| InstrumentationConfig & | IConf, | ||
| InstrumentorIRBuilderTy & | IIRB ) |
Definition at line 882 of file Instrumentor.cpp.
References llvm::Function::arg_begin(), llvm::Function::args(), llvm::cast(), llvm::instrumentor::InstrumentationOpportunity::CB, Config, llvm::instrumentor::InstrumentorIRBuilderTy::Epoch, llvm::Function::getArg(), llvm::make_filter_range(), llvm::instrumentor::InstrumentorIRBuilderTy::NewInsts, readValuePack(), and llvm::Value::replaceUsesWithIf().
Referenced by init().
| llvm::instrumentor::FunctionIO::ConfigTy llvm::instrumentor::FunctionIO::Config |
Referenced by getArguments(), getNumArguments(), init(), and setArguments().