|
LLVM 24.0.0git
|
Instrumentation opportunity for numeric operations. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | ConfigKind { PassTypeId , PassSubTypeId , PassSize , PassOpcode , PassResult , ReplaceResult , PassLeft , PassRight , 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 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. | |
| StringMap< int32_t > | FlagNames |
| Flag names and their integer bitmask values. | |
| 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::Add, Instruction::FAdd, Instruction::Sub, Instruction::FSub, Instruction::Mul, Instruction::FMul, Instruction::UDiv, Instruction::FDiv, Instruction::SDiv, Instruction::URem, Instruction::SRem, Instruction::FRem, Instruction::Shl, Instruction::LShr, Instruction::AShr, Instruction::And, Instruction::Or, Instruction::Xor, Instruction::FNeg > | |
| static constexpr std::array< unsigned, sizeof...(Opcodes)> | OpcodesArray |
Instrumentation opportunity for numeric operations.
This includes Add, FAdd, Sub, FSub, Mul, FMul, UDiv, FDiv, SDiv, URem, SRem, FRem, Shl, LShr, AShr, And, Or, Xor, and FNeg.
Definition at line 1188 of file Instrumentor.h.
Definition at line 1213 of file Instrumentor.h.
| Enumerator | |
|---|---|
| PassTypeId | |
| PassSubTypeId | |
| PassSize | |
| PassOpcode | |
| PassResult | |
| ReplaceResult | |
| PassLeft | |
| PassRight | |
| PassFlags | |
| PassId | |
| NumConfig | |
Definition at line 1199 of file Instrumentor.h.
|
inline |
Definition at line 1197 of file Instrumentor.h.
Referenced by populate().
| void NumericIO::addFlagNames | ( | ) |
Definition at line 1833 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationOpportunity::FlagNames, NUMERIC_FLAG_HAS_NO_INFS, NUMERIC_FLAG_HAS_NO_NANS, NUMERIC_FLAG_HAS_NO_SIGNED_ZEROS, NUMERIC_FLAG_IS_EXACT, NUMERIC_FLAG_NO_SIGNED_WRAP, and NUMERIC_FLAG_NO_UNSIGNED_WRAP.
Referenced by init().
|
static |
}
Definition at line 1790 of file Instrumentor.cpp.
References llvm::cast(), llvm::dyn_cast(), I, NUMERIC_FLAG_HAS_NO_INFS, NUMERIC_FLAG_HAS_NO_NANS, NUMERIC_FLAG_HAS_NO_SIGNED_ZEROS, NUMERIC_FLAG_IS_DISJOINT, NUMERIC_FLAG_IS_EXACT, NUMERIC_FLAG_NO_SIGNED_WRAP, NUMERIC_FLAG_NO_UNSIGNED_WRAP, 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.
Definition at line 1216 of file Instrumentor.h.
| void NumericIO::init | ( | InstrumentationConfig & | IConf, |
| InstrumentorIRBuilderTy & | IIRB, | ||
| ConfigTy * | UserConfig = nullptr ) |
Definition at line 1842 of file Instrumentor.cpp.
References llvm::instrumentor::InstrumentationConfig::addChoice(), llvm::instrumentor::InstrumentationOpportunity::addCommonArgs(), addFlagNames(), Config, llvm::instrumentor::InstrumentorIRBuilderTy::Ctx, getFlags(), llvm::instrumentor::BaseInstructionIO::getLeftOperand(), llvm::instrumentor::InstrumentationOpportunity::getLocationKind(), llvm::instrumentor::BaseInstructionIO::getOpcode(), llvm::instrumentor::BaseInstructionIO::getRightOperand(), llvm::instrumentor::BaseInstructionIO::getSubTypeId(), llvm::instrumentor::BaseInstructionIO::getTypeId(), llvm::instrumentor::BaseInstructionIO::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, PassResult, PassRight, PassSize, PassSubTypeId, PassTypeId, llvm::instrumentor::IRTArg::POTENTIALLY_INDIRECT, llvm::instrumentor::IRTArg::REPLACABLE, ReplaceResult, llvm::instrumentor::InstrumentationOpportunity::replaceValue(), and llvm::instrumentor::IRTArg::TYPEID.
|
inlinestatic |
Definition at line 1227 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationConfig::allocate(), llvm::instrumentor::InstrumentationLocation::INSTRUCTION_POST, llvm::instrumentor::InstrumentationLocation::INSTRUCTION_PRE, and NumericIO().
Referenced by llvm::instrumentor::InstrumentationConfig::populate().
| ConfigTy llvm::instrumentor::NumericIO::Config |
Definition at line 1214 of file Instrumentor.h.
Referenced by init().