gem5  v20.1.0.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
PhysRegId Class Reference

Physical register ID. More...

#include <reg_class.hh>

Inheritance diagram for PhysRegId:
RegId

Public Member Functions

 PhysRegId ()
 
 PhysRegId (RegClass _regClass, PhysRegIndex _regIdx, PhysRegIndex _flatIdx)
 Scalar PhysRegId constructor. More...
 
 PhysRegId (RegClass _regClass, PhysRegIndex _regIdx, ElemIndex elem_idx, PhysRegIndex flat_idx)
 Vector PhysRegId constructor (w/ elemIndex). More...
 
bool isIntPhysReg () const
 
bool isFloatPhysReg () const
 
bool isCCPhysReg () const
 @Return true if it is a condition-code physical register. More...
 
bool isVectorPhysReg () const
 @Return true if it is a vector physical register. More...
 
bool isVectorPhysElem () const
 @Return true if it is a vector element physical register. More...
 
bool isVecPredPhysReg () const
 
bool isMiscPhysReg () const
 @Return true if it is a condition-code physical register. More...
 
bool isFixedMapping () const
 Returns true if this register is always associated to the same architectural register. More...
 
const PhysRegIndexflatIndex () const
 Flat index accessor. More...
 
int getNumPinnedWrites () const
 
void setNumPinnedWrites (int numWrites)
 
void decrNumPinnedWrites ()
 
void incrNumPinnedWrites ()
 
bool isPinned () const
 
int getNumPinnedWritesToComplete () const
 
void setNumPinnedWritesToComplete (int numWrites)
 
void decrNumPinnedWritesToComplete ()
 
void incrNumPinnedWritesToComplete ()
 
bool operator< (const PhysRegId &that) const
 Explicit forward methods, to prevent comparisons of PhysRegId with RegIds. More...
 
bool operator== (const PhysRegId &that) const
 
bool operator!= (const PhysRegId &that) const
 
const RegIndexindex () const
 Visible RegId methods. More...
 
RegIndexindex ()
 Visible RegId methods. More...
 
const RegClassclassValue () const
 Class accessor. More...
 
bool isZeroReg () const
 Check if this is the zero register. More...
 
const char * className () const
 Return a const char* with the register class name. More...
 
const RegIndexelemIndex () const
 Elem accessor. More...
 

Static Public Member Functions

static PhysRegId elemId (PhysRegId *vid, ElemIndex elem)
 

Private Attributes

PhysRegIndex flatIdx
 
int numPinnedWritesToComplete
 
bool pinned
 
- Private Attributes inherited from RegId
RegClass regClass
 
RegIndex regIdx
 
ElemIndex elemIdx
 
int numPinnedWrites
 

Additional Inherited Members

- Private Member Functions inherited from RegId
 RegId ()
 
 RegId (RegClass reg_class, RegIndex reg_idx)
 
 RegId (RegClass reg_class, RegIndex reg_idx, ElemIndex elem_idx)
 
bool operator== (const RegId &that) const
 
bool operator!= (const RegId &that) const
 
bool operator< (const RegId &that) const
 Order operator. More...
 
bool isRenameable () const
 Return true if this register can be renamed. More...
 
bool isZeroReg () const
 Check if this is the zero register. More...
 
bool isIntReg () const
 
bool isFloatReg () const
 
bool isVecReg () const
 @Return true if it is a condition-code physical register. More...
 
bool isVecElem () const
 @Return true if it is a condition-code physical register. More...
 
bool isVecPredReg () const
 @Return true if it is a predicate physical register. More...
 
bool isCCReg () const
 @Return true if it is a condition-code physical register. More...
 
bool isMiscReg () const
 @Return true if it is a condition-code physical register. More...
 
bool isRenameable ()
 Return true if this register can be renamed. More...
 
const RegIndexelemIndex () const
 Elem accessor. More...
 
const RegClassclassValue () const
 Class accessor. More...
 
const char * className () const
 Return a const char* with the register class name. More...
 
int getNumPinnedWrites () const
 
void setNumPinnedWrites (int num_writes)
 
const RegIndexindex () const
 Index accessors. More...
 
RegIndexindex ()
 
RegIndex flatIndex () const
 Index flattening. More...
 
- Static Private Attributes inherited from RegId
static const char * regClassStrings []
 
static constexpr size_t Scale = TheISA::NumVecElemPerVecReg
 

Detailed Description

Physical register ID.

Like a register ID but physical. The inheritance is private because the only relationship between this types is functional, and it is done to prevent code replication.

Definition at line 223 of file reg_class.hh.

Constructor & Destructor Documentation

◆ PhysRegId() [1/3]

PhysRegId::PhysRegId ( )
inlineexplicit

Definition at line 230 of file reg_class.hh.

Referenced by elemId().

◆ PhysRegId() [2/3]

PhysRegId::PhysRegId ( RegClass  _regClass,
PhysRegIndex  _regIdx,
PhysRegIndex  _flatIdx 
)
inlineexplicit

Scalar PhysRegId constructor.

Definition at line 235 of file reg_class.hh.

◆ PhysRegId() [3/3]

PhysRegId::PhysRegId ( RegClass  _regClass,
PhysRegIndex  _regIdx,
ElemIndex  elem_idx,
PhysRegIndex  flat_idx 
)
inlineexplicit

Vector PhysRegId constructor (w/ elemIndex).

Definition at line 242 of file reg_class.hh.

Member Function Documentation

◆ className()

const char* RegId::className
inline

◆ classValue()

const RegClass& RegId::classValue
inline

Class accessor.

Definition at line 200 of file reg_class.hh.

Referenced by UnifiedFreeList::addReg().

◆ decrNumPinnedWrites()

void PhysRegId::decrNumPinnedWrites ( )
inline

Definition at line 327 of file reg_class.hh.

References RegId::numPinnedWrites.

Referenced by SimpleRenameMap::rename().

◆ decrNumPinnedWritesToComplete()

void PhysRegId::decrNumPinnedWritesToComplete ( )
inline

Definition at line 342 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by InstructionQueue< Impl >::wakeDependents().

◆ elemId()

static PhysRegId PhysRegId::elemId ( PhysRegId vid,
ElemIndex  elem 
)
inlinestatic

Definition at line 307 of file reg_class.hh.

References index(), isVectorPhysReg(), PhysRegId(), and VecElemClass.

◆ elemIndex()

const RegIndex& RegId::elemIndex
inline

◆ flatIndex()

const PhysRegIndex& PhysRegId::flatIndex ( ) const
inline

◆ getNumPinnedWrites()

int PhysRegId::getNumPinnedWrites ( ) const
inline

Definition at line 313 of file reg_class.hh.

References RegId::numPinnedWrites.

Referenced by SimpleRenameMap::rename().

◆ getNumPinnedWritesToComplete()

int PhysRegId::getNumPinnedWritesToComplete ( ) const
inline

Definition at line 332 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by InstructionQueue< Impl >::wakeDependents().

◆ incrNumPinnedWrites()

void PhysRegId::incrNumPinnedWrites ( )
inline

Definition at line 328 of file reg_class.hh.

References RegId::numPinnedWrites.

Referenced by BaseDynInst< Impl >::setSquashed().

◆ incrNumPinnedWritesToComplete()

void PhysRegId::incrNumPinnedWritesToComplete ( )
inline

Definition at line 343 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by BaseDynInst< Impl >::setSquashed().

◆ index() [1/2]

RegIndex& RegId::index
inline

Visible RegId methods.

Definition at line 174 of file reg_class.hh.

◆ index() [2/2]

const RegIndex& RegId::index
inline

◆ isCCPhysReg()

bool PhysRegId::isCCPhysReg ( ) const
inline

@Return true if it is a condition-code physical register.

Definition at line 281 of file reg_class.hh.

References RegId::isCCReg().

Referenced by PhysRegFile::readCCReg(), PhysRegFile::setCCReg(), and UnifiedRenameMap::setEntry().

◆ isFixedMapping()

bool PhysRegId::isFixedMapping ( ) const
inline

◆ isFloatPhysReg()

bool PhysRegId::isFloatPhysReg ( ) const
inline
Returns
true if it is a floating-point physical register.

Definition at line 278 of file reg_class.hh.

References RegId::isFloatReg().

Referenced by PhysRegFile::readFloatReg(), UnifiedRenameMap::setEntry(), and PhysRegFile::setFloatReg().

◆ isIntPhysReg()

bool PhysRegId::isIntPhysReg ( ) const
inline
Returns
true if it is an integer physical register.

Definition at line 275 of file reg_class.hh.

References RegId::isIntReg().

Referenced by PhysRegFile::readIntReg(), UnifiedRenameMap::setEntry(), and PhysRegFile::setIntReg().

◆ isMiscPhysReg()

bool PhysRegId::isMiscPhysReg ( ) const
inline

@Return true if it is a condition-code physical register.

Definition at line 293 of file reg_class.hh.

References RegId::isMiscReg().

◆ isPinned()

bool PhysRegId::isPinned ( ) const
inline

◆ isVecPredPhysReg()

bool PhysRegId::isVecPredPhysReg ( ) const
inline
Returns
true if it is a vector predicate physical register.

Definition at line 290 of file reg_class.hh.

References RegId::isVecPredReg().

Referenced by PhysRegFile::readVecPredReg(), UnifiedRenameMap::setEntry(), and PhysRegFile::setVecPredReg().

◆ isVectorPhysElem()

bool PhysRegId::isVectorPhysElem ( ) const
inline

@Return true if it is a vector element physical register.

Definition at line 287 of file reg_class.hh.

References RegId::isVecElem().

Referenced by PhysRegFile::readVecElem(), UnifiedRenameMap::setEntry(), and PhysRegFile::setVecElem().

◆ isVectorPhysReg()

bool PhysRegId::isVectorPhysReg ( ) const
inline

@Return true if it is a vector physical register.

Definition at line 284 of file reg_class.hh.

References RegId::isVecReg().

Referenced by elemId(), PhysRegFile::readVecReg(), UnifiedRenameMap::setEntry(), PhysRegFile::setVecLane(), and PhysRegFile::setVecReg().

◆ isZeroReg()

bool RegId::isZeroReg
inline

Check if this is the zero register.

Returns true if this register is a zero register (needs to have a constant zero value throughout the execution).

Definition at line 137 of file reg_class.hh.

Referenced by Scoreboard::getReg(), SimpleRenameMap::rename(), PhysRegFile::setFloatReg(), PhysRegFile::setIntReg(), and Scoreboard::unsetReg().

◆ operator!=()

bool PhysRegId::operator!= ( const PhysRegId that) const
inline

Definition at line 269 of file reg_class.hh.

References RegId::operator!=().

◆ operator<()

bool PhysRegId::operator< ( const PhysRegId that) const
inline

Explicit forward methods, to prevent comparisons of PhysRegId with RegIds.

Definition at line 261 of file reg_class.hh.

References RegId::operator<().

◆ operator==()

bool PhysRegId::operator== ( const PhysRegId that) const
inline

Definition at line 265 of file reg_class.hh.

References RegId::operator==().

◆ setNumPinnedWrites()

void PhysRegId::setNumPinnedWrites ( int  numWrites)
inline

Definition at line 315 of file reg_class.hh.

References RegId::numPinnedWrites, and pinned.

Referenced by SimpleRenameMap::rename().

◆ setNumPinnedWritesToComplete()

void PhysRegId::setNumPinnedWritesToComplete ( int  numWrites)
inline

Definition at line 337 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by SimpleRenameMap::rename().

Member Data Documentation

◆ flatIdx

PhysRegIndex PhysRegId::flatIdx
private

Definition at line 225 of file reg_class.hh.

Referenced by flatIndex().

◆ numPinnedWritesToComplete

int PhysRegId::numPinnedWritesToComplete
private

◆ pinned

bool PhysRegId::pinned
private

Definition at line 227 of file reg_class.hh.

Referenced by isPinned(), and setNumPinnedWrites().


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

Generated on Wed Sep 30 2020 14:02:29 for gem5 by doxygen 1.8.17