LLVM 23.0.0git
InstrumentorRuntimeHelper.h File Reference
#include <stdint.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  ValuePackHeader
 Header for each value in a value pack. More...
struct  ValuePackIterator
 Iterator for reading values from a value pack. More...

Enumerations

enum  LLVMTypeID {
  HalfTyID = 0 , BFloatTyID , FloatTyID , DoubleTyID ,
  X86_FP80TyID , FP128TyID , PPC_FP128TyID , VoidTyID ,
  LabelTyID , MetadataTyID , X86_AMXTyID , TokenTyID ,
  IntegerTyID , ByteTyID , FunctionTyID , PointerTyID ,
  StructTyID , ArrayTyID , FixedVectorTyID , ScalableVectorTyID ,
  TypedPointerTyID , TargetExtTyID
}
 LLVM Type IDs for interpreting value pack data. More...

Functions

static void initValuePackIterator (ValuePackIterator *iter, const void *pack_ptr, uint32_t num_elements)
 Initialize a value pack iterator.
static ValuePackHeader getValuePackHeader (const ValuePackIterator *iter)
 Get the header for the current value.
static const void * getValuePackData (const ValuePackIterator *iter)
 Get a pointer to the current value data.
static void nextValuePack (ValuePackIterator *iter)
 Move to the next value in the pack.
static uint64_t getValuePackOffset (const ValuePackIterator *iter)
 Get the current offset in bytes from the start of the pack.
static const void * getValuePackEntry (const void *pack_ptr, uint32_t num_elements, uint32_t index, ValuePackHeader *header)
 Extract a specific value from a value pack by index.
static const chargetLLVMTypeIDName (uint32_t type_id)
 Get the string name of an LLVM Type ID.

Enumeration Type Documentation

◆ LLVMTypeID

enum LLVMTypeID

LLVM Type IDs for interpreting value pack data.

These correspond to llvm::Type::TypeID enum values.

Enumerator
HalfTyID 

16-bit floating point type

BFloatTyID 

16-bit floating point type (7-bit significand)

FloatTyID 

32-bit floating point type

DoubleTyID 

64-bit floating point type

X86_FP80TyID 

80-bit floating point type (X87)

FP128TyID 

128-bit floating point type (112-bit significand)

PPC_FP128TyID 

128-bit floating point type (two 64-bits, PowerPC)

VoidTyID 

type with no size

LabelTyID 

Labels.

MetadataTyID 

Metadata.

X86_AMXTyID 

AMX vectors (8192 bits, X86 specific)

TokenTyID 

Tokens.

IntegerTyID 

Arbitrary bit width integers.

ByteTyID 

Arbitrary bit width bytes.

FunctionTyID 

Functions.

PointerTyID 

Pointers.

StructTyID 

Structures.

ArrayTyID 

Arrays.

FixedVectorTyID 

Fixed width SIMD vector type.

ScalableVectorTyID 

Scalable SIMD vector type.

TypedPointerTyID 

Typed pointer used by some GPU targets.

TargetExtTyID 

Target extension type.

Definition at line 127 of file InstrumentorRuntimeHelper.h.

Function Documentation

◆ getLLVMTypeIDName()

◆ getValuePackData()

const void * getValuePackData ( const ValuePackIterator * iter)
inlinestatic

Get a pointer to the current value data.

Definition at line 66 of file InstrumentorRuntimeHelper.h.

References ValuePackIterator::current, getValuePackHeader(), and ValuePackHeader::size.

Referenced by getValuePackEntry().

◆ getValuePackEntry()

const void * getValuePackEntry ( const void * pack_ptr,
uint32_t num_elements,
uint32_t index,
ValuePackHeader * header )
inlinestatic

Extract a specific value from a value pack by index.

Parameters
pack_ptrPointer to the start of the value pack
num_elementsNumber of elements in the pack
indexZero-based index of the value to extract
headerOutput parameter for the value header (can be NULL)
Returns
Pointer to the value data, or NULL if index is out of bounds

Definition at line 102 of file InstrumentorRuntimeHelper.h.

References ValuePackIterator::count, ValuePackIterator::current, getValuePackData(), getValuePackHeader(), ValuePackIterator::index, initValuePackIterator(), and nextValuePack().

◆ getValuePackHeader()

ValuePackHeader getValuePackHeader ( const ValuePackIterator * iter)
inlinestatic

Get the header for the current value.

Definition at line 60 of file InstrumentorRuntimeHelper.h.

References ValuePackIterator::current.

Referenced by getValuePackData(), getValuePackEntry(), and nextValuePack().

◆ getValuePackOffset()

uint64_t getValuePackOffset ( const ValuePackIterator * iter)
inlinestatic

Get the current offset in bytes from the start of the pack.

Definition at line 91 of file InstrumentorRuntimeHelper.h.

References ValuePackIterator::offset.

◆ initValuePackIterator()

void initValuePackIterator ( ValuePackIterator * iter,
const void * pack_ptr,
uint32_t num_elements )
inlinestatic

Initialize a value pack iterator.

Parameters
iterThe iterator to initialize
pack_ptrPointer to the start of the value pack
num_elementsNumber of elements in the pack

Definition at line 49 of file InstrumentorRuntimeHelper.h.

References ValuePackIterator::count, ValuePackIterator::current, ValuePackIterator::index, and ValuePackIterator::offset.

Referenced by getValuePackEntry().

◆ nextValuePack()

void nextValuePack ( ValuePackIterator * iter)
inlinestatic