LLVM  15.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"

Collaboration diagram for LiveDebugValues::ValueIDNum:
Collaboration graph
[legend]

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 105 of file InstrRefBasedImpl.h.

Constructor & Destructor Documentation

◆ ValueIDNum() [1/3]

LiveDebugValues::ValueIDNum::ValueIDNum ( )
inline

Definition at line 122 of file InstrRefBasedImpl.h.

◆ ValueIDNum() [2/3]

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

Definition at line 124 of file InstrRefBasedImpl.h.

◆ ValueIDNum() [3/3]

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

Definition at line 128 of file InstrRefBasedImpl.h.

References LiveDebugValues::LocIdx::asU64().

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 139 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 133 of file InstrRefBasedImpl.h.

◆ 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 153 of file InstrRefBasedImpl.h.

References Other.

◆ operator<()

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

Definition at line 145 of file InstrRefBasedImpl.h.

References Other.

◆ operator==()

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

Definition at line 149 of file InstrRefBasedImpl.h.

References Other.

Member Data Documentation

◆ BlockNo

uint64_t LiveDebugValues::ValueIDNum::BlockNo

Definition at line 108 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 109 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 112 of file InstrRefBasedImpl.h.

◆ s

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 114 of file InstrRefBasedImpl.h.

Referenced by fromU64().


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