|
LLVM 23.0.0git
|
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | ConfigKind { PassOpTypeId , PassOpSize , PassOpcode , PassPredicate , PassLeft , PassRight , PassResultTypeId , PassResultSize , PassResult , ReplaceResult , PassFlags , 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 | |
| CompareIO (InstrumentationLocation::KindTy Kind) | |
| StringRef | getName () const override |
| Get the name of the instruction. | |
| LLVM_ABI void | init (InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, ConfigTy *UserConfig=nullptr) |
| Public Member Functions inherited from llvm::instrumentor::InstructionIO< Instruction::ICmp, Instruction::FCmp > | |
| virtual | ~InstructionIO () |
| InstructionIO (InstrumentationLocation::KindTy Kind) | |
| Construct an instruction opportunity. | |
| ArrayRef< unsigned > | getAllOpcodes () const override |
| Get all opcodes for this instrumentation opportunity (override). | |
| 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. | |
| 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 |
Additional Inherited Members | |
| Static Public Attributes inherited from llvm::instrumentor::InstructionIO< Instruction::ICmp, Instruction::FCmp > | |
| static constexpr std::array< unsigned, sizeof...(Opcodes)> | OpcodesArray |
Definition at line 1203 of file Instrumentor.h.
Definition at line 1223 of file Instrumentor.h.
| Enumerator | |
|---|---|
| PassOpTypeId | |
| PassOpSize | |
| PassOpcode | |
| PassPredicate | |
| PassLeft | |
| PassRight | |
| PassResultTypeId | |
| PassResultSize | |
| PassResult | |
| ReplaceResult | |
| PassFlags | |
| PassId | |
| NumConfig | |
Definition at line 1207 of file Instrumentor.h.
|
inline |
Definition at line 1205 of file Instrumentor.h.
References llvm::instrumentor::InstructionIO< Instruction::ICmp, Instruction::FCmp >::InstructionIO().
Referenced by populate().
|
static |
Definition at line 1821 of file Instrumentor.cpp.
References llvm::cast(), COMPARE_FLAG_HAS_NO_INFS, COMPARE_FLAG_HAS_NO_NANS, COMPARE_FLAG_HAS_NO_SIGNED_ZEROS, COMPARE_FLAG_SAMESIGN, llvm::dyn_cast(), I, and NUMERIC_FLAG_NONE.
Referenced by init().
|
inlineoverridevirtual |
Get the name of the instruction.
For single-opcode IOs, this defaults to the opcode name. For multi-opcode IOs, getName() MUST be overridden to provide an explicit name identifying the whole group of opcodes.
Reimplemented from llvm::instrumentor::InstructionIO< Instruction::ICmp, Instruction::FCmp >.
Definition at line 1226 of file Instrumentor.h.
|
static |
Definition at line 1807 of file Instrumentor.cpp.
References llvm::cast(), DL, and I.
Referenced by init().
|
static |
Definition at line 1800 of file Instrumentor.cpp.
References llvm::cast(), and I.
Referenced by init().
|
static |
Definition at line 1815 of file Instrumentor.cpp.
References llvm::dyn_cast().
Referenced by init().
| void CompareIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
Definition at line 1844 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationConfig::addChoice(), llvm::instrumentor::InstrumentationOpportunity::addCommonArgs(), Config, llvm::instrumentor::InstrumentorIRBuilderTy::Ctx, getFlags(), llvm::instrumentor::getLeft(), llvm::instrumentor::InstrumentationOpportunity::getLocationKind(), llvm::instrumentor::getOpcode(), getOperandSize(), getOperandTypeId(), getPredicate(), llvm::instrumentor::getRight(), llvm::instrumentor::getTypeId(), llvm::instrumentor::getTypeSize(), llvm::instrumentor::InstrumentationOpportunity::getValue(), llvm::instrumentor::IRTArg::INDIRECT_HAS_SIZE, llvm::instrumentor::InstrumentationLocation::INSTRUCTION_PRE, llvm::instrumentor::InstrumentorIRBuilderTy::Int32Ty, llvm::instrumentor::InstrumentorIRBuilderTy::Int64Ty, llvm::instrumentor::InstrumentationOpportunity::IRTArgs, llvm::instrumentor::IRTArg::NONE, PassFlags, PassId, PassLeft, PassOpcode, PassOpSize, PassOpTypeId, PassPredicate, PassResult, PassResultSize, PassRight, llvm::instrumentor::IRTArg::POTENTIALLY_INDIRECT, llvm::instrumentor::IRTArg::REPLACABLE, ReplaceResult, and llvm::instrumentor::InstrumentationOpportunity::replaceValue().
|
inlinestatic |
Definition at line 1245 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), CompareIO(), llvm::instrumentor::InstrumentationLocation::INSTRUCTION_POST, and llvm::instrumentor::InstrumentationLocation::INSTRUCTION_PRE.
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
| ConfigTy llvm::instrumentor::CompareIO::Config |
Definition at line 1224 of file Instrumentor.h.
Referenced by init().