LLVM 23.0.0git
llvm::instrumentor::BaseInstructionIO Struct Reference

The base class that implements basic logic for any instruction instrumentation opportunity that inherits from InstructionIO. More...

#include "llvm/Transforms/IPO/Instrumentor.h"

Inheritance diagram for llvm::instrumentor::BaseInstructionIO:
[legend]

Public Member Functions

virtual ~BaseInstructionIO ()
 BaseInstructionIO (InstrumentationLocation::KindTy Kind)
Public Member Functions inherited from llvm::instrumentor::InstrumentationOpportunity
virtual ~InstrumentationOpportunity ()
 InstrumentationOpportunity (const InstrumentationLocation IP)
 Construct an opportunity with location IP.
virtual Valueinstrument (Value *&V, bool &Changed, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, InstrumentationCaches &ICaches)
 }
virtual TypegetRetTy (LLVMContext &Ctx) const
 Get the return type for the instrumentation runtime function.
virtual StringRef getName () const =0
 Get the name of the instrumentation opportunity.
virtual ArrayRef< unsignedgetAllOpcodes () const
 Get all opcodes for this instrumentation opportunity.
InstrumentationLocation::KindTy getLocationKind () const
 Get the location kind of the instrumentation opportunity.
void addCommonArgs (InstrumentationConfig &IConf, LLVMContext &Ctx, bool PassId)
 }

Static Public Member Functions

static LLVM_ABI ValuegetOpcode (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static LLVM_ABI ValuegetTypeSize (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static LLVM_ABI ValuegetLeftOperand (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static LLVM_ABI ValuegetRightOperand (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static LLVM_ABI ValuegetTypeId (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
Static Public Member Functions inherited from llvm::instrumentor::InstrumentationOpportunity
static LLVM_ABI ValueforceCast (Value &V, Type &Ty, InstrumentorIRBuilderTy &IIRB)
 Helpers to cast values, pass them to the runtime, and replace them.
static ValuegetValue (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static LLVM_ABI ValuereplaceValue (Value &V, Value &NewV, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static LLVM_ABI ValuegetIdPre (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
 Get the opportunity identifier for the pre and post positions.
static LLVM_ABI ValuegetIdPost (Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
static int32_t getIdFromEpoch (uint32_t CurrentEpoch)
 }

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.
Public Attributes inherited from llvm::instrumentor::InstrumentationOpportunity
InstrumentationLocation IP
 The instrumentation location of the opportunity.
SmallVector< IRTArgIRTArgs
 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

Detailed Description

The base class that implements basic logic for any instruction instrumentation opportunity that inherits from InstructionIO.

Definition at line 588 of file Instrumentor.h.

Constructor & Destructor Documentation

◆ ~BaseInstructionIO()

virtual llvm::instrumentor::BaseInstructionIO::~BaseInstructionIO ( )
inlinevirtual

Definition at line 589 of file Instrumentor.h.

◆ BaseInstructionIO()

llvm::instrumentor::BaseInstructionIO::BaseInstructionIO ( InstrumentationLocation::KindTy Kind)
inline

Member Function Documentation

◆ getLeftOperand()

Value * BaseInstructionIO::getLeftOperand ( Value & V,
Type & Ty,
InstrumentationConfig & IConf,
InstrumentorIRBuilderTy & IIRB )
static

Definition at line 923 of file Instrumentor.cpp.

References llvm::cast(), and I.

Referenced by llvm::instrumentor::CompareIO::init(), and llvm::instrumentor::NumericIO::init().

◆ getOpcode()

Value * BaseInstructionIO::getOpcode ( Value & V,
Type & Ty,
InstrumentationConfig & IConf,
InstrumentorIRBuilderTy & IIRB )
static

◆ getRightOperand()

Value * BaseInstructionIO::getRightOperand ( Value & V,
Type & Ty,
InstrumentationConfig & IConf,
InstrumentorIRBuilderTy & IIRB )
static

◆ getTypeId()

Value * BaseInstructionIO::getTypeId ( Value & V,
Type & Ty,
InstrumentationConfig & IConf,
InstrumentorIRBuilderTy & IIRB )
static

◆ getTypeSize()

Value * BaseInstructionIO::getTypeSize ( Value & V,
Type & Ty,
InstrumentationConfig & IConf,
InstrumentorIRBuilderTy & IIRB )
static

Definition at line 915 of file Instrumentor.cpp.

References llvm::cast(), DL, and I.

Referenced by llvm::instrumentor::CompareIO::init(), and llvm::instrumentor::NumericIO::init().


The documentation for this struct was generated from the following files: