|
LLVM 23.0.0git
|
The base instrumentation opportunity class for instruction opportunities. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Member Functions | |
| 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) |
| } | |
Additional Inherited Members | |
| 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. | |
| Static Public Member Functions inherited from llvm::instrumentor::InstrumentationOpportunity | |
| static Value * | forceCast (Value &V, Type &Ty, InstrumentorIRBuilderTy &IIRB) |
| Helpers to cast values, pass them to the runtime, and replace them. | |
| static Value * | getValue (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static Value * | replaceValue (Value &V, Value &NewV, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static Value * | getIdPre (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| Get the opportunity identifier for the pre and post positions. | |
| static Value * | getIdPost (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB) |
| static int32_t | getIdFromEpoch (uint32_t CurrentEpoch) |
| } | |
| 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 base instrumentation opportunity class for instruction opportunities.
Each instruction opportunity should inherit from this class and implement the virtual class members.
Definition at line 514 of file Instrumentor.h.
|
inlinevirtual |
Definition at line 515 of file Instrumentor.h.
|
inline |
Construct an instruction opportunity.
Definition at line 518 of file Instrumentor.h.
References llvm::instrumentor::InstrumentationOpportunity::InstrumentationOpportunity().
|
inlineoverridevirtual |
Get the name of the instruction.
Implements llvm::instrumentor::InstrumentationOpportunity.
Definition at line 522 of file Instrumentor.h.
References llvm::Instruction::getOpcodeName().