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

Helper to represent an instrumentation runtime function that is related to an instrumentation opportunity. More...

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

Public Member Functions

 IRTCallDescription (InstrumentationOpportunity &IO, Type *RetTy=nullptr)
 Construct an instrumentation function description linked to the IO instrumentation opportunity and RetTy return type.
FunctionTypecreateLLVMSignature (InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, const DataLayout &DL, bool ForceIndirection)
 Create the type of the instrumentation function.
CallInstcreateLLVMCall (Value *&V, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB, const DataLayout &DL, InstrumentationCaches &ICaches)
 Create a call instruction that calls to the instrumentation function and passes the corresponding arguments.
bool isReplacable (IRTArg &IRTA) const
 Return whether the IRTA argument can be replaced.
bool isPotentiallyIndirect (IRTArg &IRTA) const
 Return whether the function may have any indirect argument.

Public Attributes

bool RequiresIndirection = false
 Whether the function requires indirection in some argument.
bool MightRequireIndirection = false
 Whether any argument may require indirection.
unsigned NumReplaceableArgs = 0
 The number of arguments that can be replaced.
InstrumentationOpportunityIO
 The instrumentation opportunity which it is linked to.
TypeRetTy = nullptr
 The return type of the instrumentation function.

Detailed Description

Helper to represent an instrumentation runtime function that is related to an instrumentation opportunity.

Definition at line 103 of file Instrumentor.h.

Constructor & Destructor Documentation

◆ IRTCallDescription()

IRTCallDescription::IRTCallDescription ( InstrumentationOpportunity & IO,
Type * RetTy = nullptr )

Construct an instrumentation function description linked to the IO instrumentation opportunity and RetTy return type.

Definition at line 371 of file Instrumentor.cpp.

References if(), IO, MightRequireIndirection, NumReplaceableArgs, RequiresIndirection, and RetTy.

Member Function Documentation

◆ createLLVMCall()

◆ createLLVMSignature()

◆ isPotentiallyIndirect()

bool llvm::instrumentor::IRTCallDescription::isPotentiallyIndirect ( IRTArg & IRTA) const
inline

Return whether the function may have any indirect argument.

Definition at line 126 of file Instrumentor.h.

References llvm::instrumentor::IRTArg::Flags, NumReplaceableArgs, llvm::instrumentor::IRTArg::POTENTIALLY_INDIRECT, and llvm::instrumentor::IRTArg::REPLACABLE.

Referenced by createLLVMCall(), and createLLVMSignature().

◆ isReplacable()

bool llvm::instrumentor::IRTCallDescription::isReplacable ( IRTArg & IRTA) const
inline

Return whether the IRTA argument can be replaced.

Definition at line 121 of file Instrumentor.h.

References llvm::instrumentor::IRTArg::Flags, llvm::instrumentor::IRTArg::REPLACABLE, and llvm::instrumentor::IRTArg::REPLACABLE_CUSTOM.

Referenced by createLLVMCall().

Member Data Documentation

◆ IO

InstrumentationOpportunity& llvm::instrumentor::IRTCallDescription::IO

The instrumentation opportunity which it is linked to.

Definition at line 141 of file Instrumentor.h.

Referenced by createLLVMCall(), createLLVMSignature(), and IRTCallDescription().

◆ MightRequireIndirection

bool llvm::instrumentor::IRTCallDescription::MightRequireIndirection = false

Whether any argument may require indirection.

Definition at line 135 of file Instrumentor.h.

Referenced by createLLVMSignature(), and IRTCallDescription().

◆ NumReplaceableArgs

unsigned llvm::instrumentor::IRTCallDescription::NumReplaceableArgs = 0

The number of arguments that can be replaced.

Definition at line 138 of file Instrumentor.h.

Referenced by createLLVMSignature(), IRTCallDescription(), and isPotentiallyIndirect().

◆ RequiresIndirection

bool llvm::instrumentor::IRTCallDescription::RequiresIndirection = false

Whether the function requires indirection in some argument.

Definition at line 132 of file Instrumentor.h.

Referenced by createLLVMCall(), createLLVMSignature(), and IRTCallDescription().

◆ RetTy

Type* llvm::instrumentor::IRTCallDescription::RetTy = nullptr

The return type of the instrumentation function.

Definition at line 144 of file Instrumentor.h.

Referenced by createLLVMSignature(), and IRTCallDescription().


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