LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
LiveDebugValues::ValueIDNum Class Reference

Unique identifier for a value defined by an instruction, as a value type. More...

#include "CodeGen/LiveDebugValues/InstrRefBasedImpl.h"

Public Member Functions

 ValueIDNum ()
 
 ValueIDNum (uint64_t Block, uint64_t Inst, uint64_t Loc)
 
 ValueIDNum (uint64_t Block, uint64_t Inst, LocIdx Loc)
 
uint64_t getBlock () const
 
uint64_t getInst () const
 
uint64_t getLoc () const
 
bool isPHI () const
 
uint64_t asU64 () const
 
bool operator< (const ValueIDNum &Other) const
 
bool operator== (const ValueIDNum &Other) const
 
bool operator!= (const ValueIDNum &Other) const
 
std::string asString (const std::string &mlocname) const
 

Static Public Member Functions

static ValueIDNum fromU64 (uint64_t v)
 

Static Public Attributes

static ValueIDNum EmptyValue = {UINT_MAX, UINT_MAX, UINT_MAX}
 
static ValueIDNum TombstoneValue = {UINT_MAX, UINT_MAX, UINT_MAX - 1}
 

Detailed Description

Unique identifier for a value defined by an instruction, as a value type.

Casts back and forth to a uint64_t. Probably replacable with something less bit-constrained. Each value identifies the instruction and machine location where the value is defined, although there may be no corresponding machine operand for it (ex: regmasks clobbering values). The instructions are one-based, and definitions that are PHIs have instruction number zero.

The obvious limits of a 1M block function or 1M instruction blocks are problematic; but by that point we should probably have bailed out of trying to analyse the function.

Definition at line 107 of file InstrRefBasedImpl.h.

Constructor & Destructor Documentation

◆ ValueIDNum() [1/3]

LiveDebugValues::ValueIDNum::ValueIDNum ( )
inline

Definition at line 124 of file InstrRefBasedImpl.h.

References asU64(), and EmptyValue.

◆ ValueIDNum() [2/3]

LiveDebugValues::ValueIDNum::ValueIDNum ( uint64_t  Block,
uint64_t  Inst,
uint64_t  Loc 
)
inline

Definition at line 126 of file InstrRefBasedImpl.h.

References llvm::Block.

◆ ValueIDNum() [3/3]

LiveDebugValues::ValueIDNum::ValueIDNum ( uint64_t  Block,
uint64_t  Inst,
LocIdx  Loc 
)
inline

Definition at line 130 of file InstrRefBasedImpl.h.

References LiveDebugValues::LocIdx::asU64(), and llvm::Block.

Member Function Documentation

◆ asString()

std::string LiveDebugValues::ValueIDNum::asString ( const std::string &  mlocname) const
inline

◆ asU64()

uint64_t LiveDebugValues::ValueIDNum::asU64 ( ) const
inline

◆ fromU64()

static ValueIDNum LiveDebugValues::ValueIDNum::fromU64 ( uint64_t  v)
inlinestatic

Definition at line 141 of file InstrRefBasedImpl.h.

References Value.

◆ getBlock()

uint64_t LiveDebugValues::ValueIDNum::getBlock ( ) const
inline

◆ getInst()

uint64_t LiveDebugValues::ValueIDNum::getInst ( ) const
inline

Definition at line 135 of file InstrRefBasedImpl.h.

Referenced by TransferTracker::loadVarInloc().

◆ getLoc()

uint64_t LiveDebugValues::ValueIDNum::getLoc ( ) const
inline

◆ isPHI()

bool LiveDebugValues::ValueIDNum::isPHI ( ) const
inline

◆ operator!=()

bool LiveDebugValues::ValueIDNum::operator!= ( const ValueIDNum Other) const
inline

Definition at line 155 of file InstrRefBasedImpl.h.

References llvm::Other.

◆ operator<()

bool LiveDebugValues::ValueIDNum::operator< ( const ValueIDNum Other) const
inline

Definition at line 147 of file InstrRefBasedImpl.h.

References asU64(), and llvm::Other.

◆ operator==()

bool LiveDebugValues::ValueIDNum::operator== ( const ValueIDNum Other) const
inline

Definition at line 151 of file InstrRefBasedImpl.h.

References llvm::Other.

Member Data Documentation

◆ BlockNo

uint64_t LiveDebugValues::ValueIDNum::BlockNo

Definition at line 110 of file InstrRefBasedImpl.h.

◆ EmptyValue

ValueIDNum ValueIDNum::EmptyValue = {UINT_MAX, UINT_MAX, UINT_MAX}
static

◆ InstNo

uint64_t LiveDebugValues::ValueIDNum::InstNo

The block where the def happens.

Definition at line 111 of file InstrRefBasedImpl.h.

◆ LocNo

uint64_t LiveDebugValues::ValueIDNum::LocNo

The Instruction where the def happens.

One based, is distance from start of block.

Definition at line 113 of file InstrRefBasedImpl.h.

◆ 

struct { ... } LiveDebugValues::ValueIDNum::s

◆ TombstoneValue

ValueIDNum ValueIDNum::TombstoneValue = {UINT_MAX, UINT_MAX, UINT_MAX - 1}
static

◆ Value

uint64_t LiveDebugValues::ValueIDNum::Value

Definition at line 116 of file InstrRefBasedImpl.h.

Referenced by fromU64().


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