gem5
v20.1.0.0
|
Free list for a single class of registers (e.g., integer or floating point). More...
#include <free_list.hh>
Public Member Functions | |
SimpleFreeList () | |
void | addReg (PhysRegIdPtr reg) |
Add a physical register to the free list. More... | |
template<class InputIt > | |
void | addRegs (InputIt first, InputIt last) |
Add physical registers to the free list. More... | |
PhysRegIdPtr | getReg () |
Get the next available register from the free list. More... | |
unsigned | numFreeRegs () const |
Return the number of free registers on the list. More... | |
bool | hasFreeRegs () const |
True iff there are free registers on the list. More... | |
Private Attributes | |
std::queue< PhysRegIdPtr > | freeRegs |
The actual free list. More... | |
Free list for a single class of registers (e.g., integer or floating point).
Because the register class is implicitly determined by the rename map instance being accessed, all architectural register index parameters and values in this class are relative (e.g., fp2 is just index 2).
Definition at line 62 of file free_list.hh.
|
inline |
Definition at line 71 of file free_list.hh.
|
inline |
Add a physical register to the free list.
Definition at line 74 of file free_list.hh.
References freeRegs, and X86ISA::reg.
Referenced by UnifiedFreeList::addCCReg(), UnifiedFreeList::addFloatReg(), UnifiedFreeList::addIntReg(), UnifiedFreeList::addReg(), UnifiedFreeList::addVecElem(), UnifiedFreeList::addVecPredReg(), and UnifiedFreeList::addVecReg().
|
inline |
Add physical registers to the free list.
Definition at line 79 of file free_list.hh.
References X86ISA::reg.
Referenced by UnifiedFreeList::addRegs().
|
inline |
Get the next available register from the free list.
Definition at line 86 of file free_list.hh.
References freeRegs.
Referenced by UnifiedFreeList::getCCReg(), UnifiedFreeList::getFloatReg(), UnifiedFreeList::getIntReg(), UnifiedFreeList::getVecElem(), UnifiedFreeList::getVecPredReg(), UnifiedFreeList::getVecReg(), and SimpleRenameMap::rename().
|
inline |
True iff there are free registers on the list.
Definition at line 98 of file free_list.hh.
References freeRegs.
Referenced by UnifiedFreeList::hasFreeCCRegs(), UnifiedFreeList::hasFreeFloatRegs(), UnifiedFreeList::hasFreeIntRegs(), UnifiedFreeList::hasFreeVecElems(), UnifiedFreeList::hasFreeVecPredRegs(), and UnifiedFreeList::hasFreeVecRegs().
|
inline |
Return the number of free registers on the list.
Definition at line 95 of file free_list.hh.
References freeRegs.
Referenced by UnifiedFreeList::numFreeCCRegs(), SimpleRenameMap::numFreeEntries(), UnifiedFreeList::numFreeFloatRegs(), UnifiedFreeList::numFreeIntRegs(), UnifiedFreeList::numFreeVecElems(), UnifiedFreeList::numFreeVecPredRegs(), and UnifiedFreeList::numFreeVecRegs().
|
private |
The actual free list.
Definition at line 67 of file free_list.hh.
Referenced by addReg(), getReg(), hasFreeRegs(), and numFreeRegs().