gem5
v20.1.0.0
|
Physical register ID. More...
#include <reg_class.hh>
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 PhysRegIndex & | flatIndex () 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 RegIndex & | index () const |
Visible RegId methods. More... | |
RegIndex & | index () |
Visible RegId methods. More... | |
const RegClass & | classValue () 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 RegIndex & | elemIndex () 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 RegIndex & | elemIndex () const |
Elem accessor. More... | |
const RegClass & | classValue () 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 RegIndex & | index () const |
Index accessors. More... | |
RegIndex & | index () |
RegIndex | flatIndex () const |
Index flattening. More... | |
Static Private Attributes inherited from RegId | |
static const char * | regClassStrings [] |
static constexpr size_t | Scale = TheISA::NumVecElemPerVecReg |
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.
|
inlineexplicit |
Definition at line 230 of file reg_class.hh.
Referenced by elemId().
|
inlineexplicit |
Scalar PhysRegId constructor.
Definition at line 235 of file reg_class.hh.
|
inlineexplicit |
Vector PhysRegId constructor (w/ elemIndex).
Definition at line 242 of file reg_class.hh.
|
inline |
Return a const char* with the register class name.
Definition at line 202 of file reg_class.hh.
Referenced by UnifiedFreeList::addReg(), InstructionQueue< Impl >::addToDependents(), InstructionQueue< Impl >::addToProducers(), DefaultRename< Impl >::renameSrcRegs(), Scoreboard::setReg(), ElasticTrace::updateRegDep(), and InstructionQueue< Impl >::wakeDependents().
|
inline |
Class accessor.
Definition at line 200 of file reg_class.hh.
Referenced by UnifiedFreeList::addReg().
|
inline |
Definition at line 327 of file reg_class.hh.
References RegId::numPinnedWrites.
Referenced by SimpleRenameMap::rename().
|
inline |
Definition at line 342 of file reg_class.hh.
References numPinnedWritesToComplete.
Referenced by InstructionQueue< Impl >::wakeDependents().
Definition at line 307 of file reg_class.hh.
References index(), isVectorPhysReg(), PhysRegId(), and VecElemClass.
|
inline |
Elem accessor.
Definition at line 198 of file reg_class.hh.
Referenced by PhysRegFile::readVecElem(), PhysRegFile::readVecLane(), PhysRegFile::setVecElem(), and PhysRegFile::setVecLane().
|
inline |
Flat index accessor.
Definition at line 305 of file reg_class.hh.
References flatIdx.
Referenced by InstructionQueue< Impl >::addToDependents(), InstructionQueue< Impl >::addToProducers(), InstructionQueue< Impl >::doSquash(), Scoreboard::getReg(), SimpleRenameMap::rename(), DefaultRename< Impl >::renameSrcRegs(), Scoreboard::setReg(), Scoreboard::unsetReg(), ElasticTrace::updateRegDep(), and InstructionQueue< Impl >::wakeDependents().
|
inline |
Definition at line 313 of file reg_class.hh.
References RegId::numPinnedWrites.
Referenced by SimpleRenameMap::rename().
|
inline |
Definition at line 332 of file reg_class.hh.
References numPinnedWritesToComplete.
Referenced by InstructionQueue< Impl >::wakeDependents().
|
inline |
Definition at line 328 of file reg_class.hh.
References RegId::numPinnedWrites.
Referenced by BaseDynInst< Impl >::setSquashed().
|
inline |
Definition at line 343 of file reg_class.hh.
References numPinnedWritesToComplete.
Referenced by BaseDynInst< Impl >::setSquashed().
|
inline |
Visible RegId methods.
Definition at line 174 of file reg_class.hh.
|
inline |
Visible RegId methods.
Definition at line 173 of file reg_class.hh.
Referenced by UnifiedFreeList::addReg(), InstructionQueue< Impl >::addToDependents(), InstructionQueue< Impl >::addToProducers(), elemId(), PhysRegFile::readCCReg(), PhysRegFile::readFloatReg(), PhysRegFile::readIntReg(), PhysRegFile::readVecElem(), PhysRegFile::readVecPredReg(), PhysRegFile::readVecReg(), DefaultRename< Impl >::renameSrcRegs(), PhysRegFile::setCCReg(), PhysRegFile::setFloatReg(), PhysRegFile::setIntReg(), Scoreboard::setReg(), PhysRegFile::setVecElem(), PhysRegFile::setVecLane(), PhysRegFile::setVecPredReg(), PhysRegFile::setVecReg(), and InstructionQueue< Impl >::wakeDependents().
|
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().
|
inline |
Returns true if this register is always associated to the same architectural register.
Definition at line 299 of file reg_class.hh.
References RegId::isRenameable().
Referenced by InstructionQueue< Impl >::addToDependents(), InstructionQueue< Impl >::addToProducers(), InstructionQueue< Impl >::doSquash(), Scoreboard::getReg(), Scoreboard::setReg(), Scoreboard::unsetReg(), and InstructionQueue< Impl >::wakeDependents().
|
inline |
Definition at line 278 of file reg_class.hh.
References RegId::isFloatReg().
Referenced by PhysRegFile::readFloatReg(), UnifiedRenameMap::setEntry(), and PhysRegFile::setFloatReg().
|
inline |
Definition at line 275 of file reg_class.hh.
References RegId::isIntReg().
Referenced by PhysRegFile::readIntReg(), UnifiedRenameMap::setEntry(), and PhysRegFile::setIntReg().
|
inline |
@Return true if it is a condition-code physical register.
Definition at line 293 of file reg_class.hh.
References RegId::isMiscReg().
|
inline |
Definition at line 330 of file reg_class.hh.
References pinned.
Referenced by BaseDynInst< Impl >::renameDestReg(), BaseDynInst< Impl >::setSquashed(), and InstructionQueue< Impl >::wakeDependents().
|
inline |
Definition at line 290 of file reg_class.hh.
References RegId::isVecPredReg().
Referenced by PhysRegFile::readVecPredReg(), UnifiedRenameMap::setEntry(), and PhysRegFile::setVecPredReg().
|
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().
|
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().
|
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().
|
inline |
Definition at line 269 of file reg_class.hh.
References RegId::operator!=().
|
inline |
Explicit forward methods, to prevent comparisons of PhysRegId with RegIds.
Definition at line 261 of file reg_class.hh.
References RegId::operator<().
|
inline |
Definition at line 265 of file reg_class.hh.
References RegId::operator==().
|
inline |
Definition at line 315 of file reg_class.hh.
References RegId::numPinnedWrites, and pinned.
Referenced by SimpleRenameMap::rename().
|
inline |
Definition at line 337 of file reg_class.hh.
References numPinnedWritesToComplete.
Referenced by SimpleRenameMap::rename().
|
private |
Definition at line 225 of file reg_class.hh.
Referenced by flatIndex().
|
private |
Definition at line 226 of file reg_class.hh.
Referenced by decrNumPinnedWritesToComplete(), getNumPinnedWritesToComplete(), incrNumPinnedWritesToComplete(), and setNumPinnedWritesToComplete().
|
private |
Definition at line 227 of file reg_class.hh.
Referenced by isPinned(), and setNumPinnedWrites().