gem5 v24.0.0.0
|
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. | |
std::string | name () const |
Gives the name of the freelist. | |
PhysRegIdPtr | getReg (RegClassType type) |
Gets a free register of type type. | |
template<class InputIt > | |
void | addRegs (InputIt first, InputIt last) |
Adds a register back to the free list. | |
void | addReg (PhysRegIdPtr freed_reg) |
Adds a register back to the free list. | |
bool | hasFreeRegs (RegClassType type) const |
Checks if there are any free registers of type type. | |
unsigned | numFreeRegs (RegClassType type) const |
Returns the number of free registers of type type. | |
Private Attributes | |
const std::string | _name |
The object name, for DPRINTF. | |
std::array< SimpleFreeList, CCRegClass+1 > | freeLists |
PhysRegFile * | regFile |
The register file object is used only to distinguish integer from floating-point physical register indices. | |
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 124 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 register back to the free list.
Definition at line 174 of file free_list.hh.
References gem5::PhysRegId::classValue(), and freeLists.
Referenced by addRegs(), gem5::o3::Rename::checkSignalsAndUpdate(), and gem5::o3::Rename::removeFromHistory().
|
inline |
Adds a register back to the free list.
Definition at line 167 of file free_list.hh.
References addReg(), and gem5::X86ISA::reg.
Referenced by gem5::o3::PhysRegFile::initFreeList().
|
inline |
Gets a free register of type type.
Definition at line 162 of file free_list.hh.
References freeLists, and gem5::X86ISA::type.
Referenced by gem5::o3::CPU::insertThread().
|
inline |
Checks if there are any free registers of type type.
Definition at line 181 of file free_list.hh.
References freeLists, and gem5::X86ISA::type.
|
inline |
|
inline |
Returns the number of free registers of type type.
Definition at line 188 of file free_list.hh.
References freeLists, and gem5::X86ISA::type.
|
friend |
Definition at line 145 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 130 of file free_list.hh.
Referenced by name().
|
private |
Definition at line 132 of file free_list.hh.
Referenced by addReg(), getReg(), hasFreeRegs(), gem5::o3::UnifiedRenameMap::init(), and numFreeRegs().
|
private |
The register file object is used only to distinguish integer from floating-point physical register indices.
Definition at line 138 of file free_list.hh.
Referenced by UnifiedFreeList().