LLVM 22.0.0git
LiveDebugValues::DbgOpID Struct Reference

An ID used in the DbgOpIDMap (below) to lookup a stored DbgOp. More...

#include "CodeGen/LiveDebugValues/InstrRefBasedImpl.h"

Classes

struct  IsConstIndexPair

Public Member Functions

 DbgOpID ()
 DbgOpID (uint32_t RawID)
 DbgOpID (bool IsConst, uint32_t Index)
bool operator== (const DbgOpID &Other) const
bool operator!= (const DbgOpID &Other) const
uint32_t asU32 () const
bool isUndef () const
bool isConst () const
uint32_t getIndex () const
void dump (const MLocTracker *MTrack, const DbgOpIDMap *OpStore) const

Public Attributes

union { 
   struct IsConstIndexPair   ID 
   uint32_t   RawID 
}; 

Static Public Attributes

static LLVM_ABI_FOR_TEST DbgOpID UndefID = DbgOpID(0xffffffff)

Detailed Description

An ID used in the DbgOpIDMap (below) to lookup a stored DbgOp.

This is used in place of actual DbgOps inside of a DbgValue to reduce its size, as DbgValue is very frequently used and passed around, and the actual DbgOp is over 8x larger than this class, due to storing a MachineOperand. This ID should be equal for all equal DbgOps, and also encodes whether the mapped DbgOp is a constant, meaning that for simple equality or const-ness checks it is not necessary to lookup this ID.

Definition at line 412 of file InstrRefBasedImpl.h.

Constructor & Destructor Documentation

◆ DbgOpID() [1/3]

LiveDebugValues::DbgOpID::DbgOpID ( )
inline

Definition at line 423 of file InstrRefBasedImpl.h.

References DbgOpID(), RawID, and UndefID.

Referenced by DbgOpID(), operator!=(), and operator==().

◆ DbgOpID() [2/3]

LiveDebugValues::DbgOpID::DbgOpID ( uint32_t RawID)
inline

Definition at line 426 of file InstrRefBasedImpl.h.

References RawID.

◆ DbgOpID() [3/3]

LiveDebugValues::DbgOpID::DbgOpID ( bool IsConst,
uint32_t Index )
inline

Definition at line 427 of file InstrRefBasedImpl.h.

References ID.

Member Function Documentation

◆ asU32()

uint32_t LiveDebugValues::DbgOpID::asU32 ( ) const
inline

Definition at line 434 of file InstrRefBasedImpl.h.

References RawID.

Referenced by dump().

◆ dump()

void DbgOpID::dump ( const MLocTracker * MTrack,
const DbgOpIDMap * OpStore ) const

◆ getIndex()

uint32_t LiveDebugValues::DbgOpID::getIndex ( ) const
inline

Definition at line 438 of file InstrRefBasedImpl.h.

References ID.

◆ isConst()

bool LiveDebugValues::DbgOpID::isConst ( ) const
inline

Definition at line 437 of file InstrRefBasedImpl.h.

References ID, and isUndef().

◆ isUndef()

bool LiveDebugValues::DbgOpID::isUndef ( ) const
inline

Definition at line 436 of file InstrRefBasedImpl.h.

References UndefID.

Referenced by isConst().

◆ operator!=()

bool LiveDebugValues::DbgOpID::operator!= ( const DbgOpID & Other) const
inline

Definition at line 432 of file InstrRefBasedImpl.h.

References DbgOpID(), and llvm::Other.

◆ operator==()

bool LiveDebugValues::DbgOpID::operator== ( const DbgOpID & Other) const
inline

Definition at line 431 of file InstrRefBasedImpl.h.

References DbgOpID(), llvm::Other, and RawID.

Member Data Documentation

◆ [union]

union { ... } LiveDebugValues::DbgOpID

◆ ID

struct IsConstIndexPair LiveDebugValues::DbgOpID::ID

Definition at line 419 of file InstrRefBasedImpl.h.

Referenced by DbgOpID(), getIndex(), and isConst().

◆ RawID

uint32_t LiveDebugValues::DbgOpID::RawID

Definition at line 420 of file InstrRefBasedImpl.h.

Referenced by asU32(), DbgOpID(), DbgOpID(), and operator==().

◆ UndefID


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