|
gem5
v21.2.1.1
|
FreeList class that simply holds the list of free integer and floating point registers. More...
#include <free_list.hh>
Public Member Functions | |
| UnifiedFreeList (const std::string &_my_name, PhysRegFile *_regFile) | |
| Constructs a free list. More... | |
| std::string | name () const |
| Gives the name of the freelist. More... | |
| SimpleFreeList * | getCCList () |
| Returns a pointer to the condition-code free list. More... | |
| PhysRegIdPtr | getIntReg () |
| Gets a free integer register. More... | |
| PhysRegIdPtr | getFloatReg () |
| Gets a free fp register. More... | |
| PhysRegIdPtr | getVecReg () |
| Gets a free vector register. More... | |
| PhysRegIdPtr | getVecElem () |
| Gets a free vector elemenet register. More... | |
| PhysRegIdPtr | getVecPredReg () |
| Gets a free predicate register. More... | |
| PhysRegIdPtr | getCCReg () |
| Gets a free cc register. More... | |
| void | addReg (PhysRegIdPtr freed_reg) |
| Adds a register back to the free list. More... | |
| template<class InputIt > | |
| void | addRegs (InputIt first, InputIt last) |
| Adds a register back to the free list. More... | |
| void | addIntReg (PhysRegIdPtr freed_reg) |
| Adds an integer register back to the free list. More... | |
| void | addFloatReg (PhysRegIdPtr freed_reg) |
| Adds a fp register back to the free list. More... | |
| void | addVecReg (PhysRegIdPtr freed_reg) |
| Adds a vector register back to the free list. More... | |
| void | addVecElem (PhysRegIdPtr freed_reg) |
| Adds a vector element register back to the free list. More... | |
| void | addVecPredReg (PhysRegIdPtr freed_reg) |
| Adds a predicate register back to the free list. More... | |
| void | addCCReg (PhysRegIdPtr freed_reg) |
| Adds a cc register back to the free list. More... | |
| bool | hasFreeIntRegs () const |
| Checks if there are any free integer registers. More... | |
| bool | hasFreeFloatRegs () const |
| Checks if there are any free fp registers. More... | |
| bool | hasFreeVecRegs () const |
| Checks if there are any free vector registers. More... | |
| bool | hasFreeVecElems () const |
| Checks if there are any free vector registers. More... | |
| bool | hasFreeVecPredRegs () const |
| Checks if there are any free predicate registers. More... | |
| bool | hasFreeCCRegs () const |
| Checks if there are any free cc registers. More... | |
| unsigned | numFreeIntRegs () const |
| Returns the number of free integer registers. More... | |
| unsigned | numFreeFloatRegs () const |
| Returns the number of free fp registers. More... | |
| unsigned | numFreeVecRegs () const |
| Returns the number of free vector registers. More... | |
| unsigned | numFreeVecElems () const |
| Returns the number of free vector registers. More... | |
| unsigned | numFreeVecPredRegs () const |
| Returns the number of free predicate registers. More... | |
| unsigned | numFreeCCRegs () const |
| Returns the number of free cc registers. More... | |
Private Attributes | |
| const std::string | _name |
| The object name, for DPRINTF. More... | |
| SimpleFreeList | intList |
| The list of free integer registers. More... | |
| SimpleFreeList | floatList |
| The list of free floating point registers. More... | |
| SimpleFreeList | predList |
| The list of free predicate registers. More... | |
| SimpleFreeList | ccList |
| The list of free condition-code registers. More... | |
| PhysRegFile * | regFile |
| The register file object is used only to distinguish integer from floating-point physical register indices. More... | |
| SimpleFreeList | vecList |
| The following two are exclusive interfaces. More... | |
| SimpleFreeList | vecElemList |
| The list of free vector element registers. More... | |
Friends | |
| class | UnifiedRenameMap |
FreeList class that simply holds the list of free integer and floating point registers.
Can request for a free register of either type, and also send back free registers of either type. This is a very simple class, but it should be sufficient for most implementations. Like all other classes, it assumes that the indices for the floating point registers starts after the integer registers end. Hence the variable numPhysicalIntRegs is logically equivalent to the baseFP dependency. Note that while this most likely should be called FreeList, the name "FreeList" is used in a typedef within the CPU Policy, and therefore no class can be named simply "FreeList".
Definition at line 122 of file free_list.hh.
| gem5::o3::UnifiedFreeList::UnifiedFreeList | ( | const std::string & | _my_name, |
| PhysRegFile * | _regFile | ||
| ) |
Constructs a free list.
| _numPhysicalIntRegs | Number of physical integer registers. |
| reservedIntRegs | Number of integer registers already used by initial mappings. |
| _numPhysicalFloatRegs | Number of physical fp registers. |
| reservedFloatRegs | Number of fp registers already used by initial mappings. |
Definition at line 41 of file free_list.cc.
References DPRINTF, gem5::o3::PhysRegFile::initFreeList(), and regFile.
|
inline |
Adds a cc register back to the free list.
Definition at line 224 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), and ccList.
|
inline |
Adds a fp register back to the free list.
Definition at line 210 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), and floatList.
|
inline |
Adds an integer register back to the free list.
Definition at line 207 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), and intList.
|
inline |
Adds a register back to the free list.
Definition at line 303 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), ccList, gem5::CCRegClass, gem5::PhysRegId::className(), gem5::PhysRegId::classValue(), DPRINTF, floatList, gem5::FloatRegClass, gem5::PhysRegId::index(), intList, gem5::IntRegClass, panic, predList, gem5::VecElemClass, vecElemList, vecList, gem5::VecPredRegClass, and gem5::VecRegClass.
Referenced by gem5::o3::Rename::doSquash(), and gem5::o3::Rename::removeFromHistory().
|
inline |
Adds a register back to the free list.
Definition at line 265 of file free_list.hh.
References gem5::o3::SimpleFreeList::addRegs(), ccList, gem5::CCRegClass, floatList, gem5::FloatRegClass, intList, gem5::IntRegClass, panic, panic_if, predList, gem5::VecElemClass, vecElemList, vecList, gem5::VecPredRegClass, and gem5::VecRegClass.
Referenced by gem5::o3::PhysRegFile::initFreeList().
|
inline |
Adds a vector element register back to the free list.
Definition at line 216 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), and vecElemList.
|
inline |
Adds a predicate register back to the free list.
Definition at line 221 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), and predList.
|
inline |
Adds a vector register back to the free list.
Definition at line 213 of file free_list.hh.
References gem5::o3::SimpleFreeList::addReg(), and vecList.
|
inline |
Returns a pointer to the condition-code free list.
Definition at line 179 of file free_list.hh.
References ccList.
|
inline |
Gets a free cc register.
Definition at line 197 of file free_list.hh.
References ccList, and gem5::o3::SimpleFreeList::getReg().
Referenced by gem5::o3::CPU::insertThread().
|
inline |
Gets a free fp register.
Definition at line 185 of file free_list.hh.
References floatList, and gem5::o3::SimpleFreeList::getReg().
Referenced by gem5::o3::CPU::insertThread().
|
inline |
Gets a free integer register.
Definition at line 182 of file free_list.hh.
References gem5::o3::SimpleFreeList::getReg(), and intList.
Referenced by gem5::o3::CPU::insertThread().
|
inline |
Gets a free vector elemenet register.
Definition at line 191 of file free_list.hh.
References gem5::o3::SimpleFreeList::getReg(), and vecElemList.
|
inline |
Gets a free predicate register.
Definition at line 194 of file free_list.hh.
References gem5::o3::SimpleFreeList::getReg(), and predList.
|
inline |
Gets a free vector register.
Definition at line 188 of file free_list.hh.
References gem5::o3::SimpleFreeList::getReg(), and vecList.
|
inline |
Checks if there are any free cc registers.
Definition at line 242 of file free_list.hh.
References ccList, and gem5::o3::SimpleFreeList::hasFreeRegs().
|
inline |
Checks if there are any free fp registers.
Definition at line 230 of file free_list.hh.
References floatList, and gem5::o3::SimpleFreeList::hasFreeRegs().
|
inline |
Checks if there are any free integer registers.
Definition at line 227 of file free_list.hh.
References gem5::o3::SimpleFreeList::hasFreeRegs(), and intList.
|
inline |
Checks if there are any free vector registers.
Definition at line 236 of file free_list.hh.
References gem5::o3::SimpleFreeList::hasFreeRegs(), and vecElemList.
|
inline |
Checks if there are any free predicate registers.
Definition at line 239 of file free_list.hh.
References gem5::o3::SimpleFreeList::hasFreeRegs(), and predList.
|
inline |
Checks if there are any free vector registers.
Definition at line 233 of file free_list.hh.
References gem5::o3::SimpleFreeList::hasFreeRegs(), and vecList.
|
inline |
|
inline |
Returns the number of free cc registers.
Definition at line 260 of file free_list.hh.
References ccList, and gem5::o3::SimpleFreeList::numFreeRegs().
|
inline |
Returns the number of free fp registers.
Definition at line 248 of file free_list.hh.
References floatList, and gem5::o3::SimpleFreeList::numFreeRegs().
|
inline |
Returns the number of free integer registers.
Definition at line 245 of file free_list.hh.
References intList, and gem5::o3::SimpleFreeList::numFreeRegs().
|
inline |
Returns the number of free vector registers.
Definition at line 254 of file free_list.hh.
References gem5::o3::SimpleFreeList::numFreeRegs(), and vecElemList.
|
inline |
Returns the number of free predicate registers.
Definition at line 257 of file free_list.hh.
References gem5::o3::SimpleFreeList::numFreeRegs(), and predList.
|
inline |
Returns the number of free vector registers.
Definition at line 251 of file free_list.hh.
References gem5::o3::SimpleFreeList::numFreeRegs(), and vecList.
|
friend |
Definition at line 162 of file free_list.hh.
|
private |
The object name, for DPRINTF.
We have to declare this explicitly because Scoreboard is not a SimObject.
Definition at line 128 of file free_list.hh.
Referenced by name().
|
private |
The list of free condition-code registers.
Definition at line 149 of file free_list.hh.
Referenced by addCCReg(), addReg(), addRegs(), getCCList(), getCCReg(), hasFreeCCRegs(), gem5::o3::UnifiedRenameMap::init(), and numFreeCCRegs().
|
private |
The list of free floating point registers.
Definition at line 134 of file free_list.hh.
Referenced by addFloatReg(), addReg(), addRegs(), getFloatReg(), hasFreeFloatRegs(), gem5::o3::UnifiedRenameMap::init(), and numFreeFloatRegs().
|
private |
The list of free integer registers.
Definition at line 131 of file free_list.hh.
Referenced by addIntReg(), addReg(), addRegs(), getIntReg(), hasFreeIntRegs(), gem5::o3::UnifiedRenameMap::init(), and numFreeIntRegs().
|
private |
The list of free predicate registers.
Definition at line 146 of file free_list.hh.
Referenced by addReg(), addRegs(), addVecPredReg(), getVecPredReg(), hasFreeVecPredRegs(), gem5::o3::UnifiedRenameMap::init(), and numFreeVecPredRegs().
|
private |
The register file object is used only to distinguish integer from floating-point physical register indices.
Definition at line 155 of file free_list.hh.
Referenced by UnifiedFreeList().
|
private |
The list of free vector element registers.
Definition at line 142 of file free_list.hh.
Referenced by addReg(), addRegs(), addVecElem(), getVecElem(), hasFreeVecElems(), gem5::o3::UnifiedRenameMap::init(), and numFreeVecElems().
|
private |
The following two are exclusive interfaces.
The list of free vector registers.
Definition at line 139 of file free_list.hh.
Referenced by addReg(), addRegs(), addVecReg(), getVecReg(), hasFreeVecRegs(), gem5::o3::UnifiedRenameMap::init(), and numFreeVecRegs().