Go to the documentation of this file.
42 #ifndef __CPU_O3_FREE_LIST_HH__
43 #define __CPU_O3_FREE_LIST_HH__
52 #include "debug/FreeList.hh"
60 class UnifiedRenameMap;
84 template<
class InputIt>
87 std::for_each(first, last, [
this](
typename InputIt::value_type&
reg) {
203 template<
class InputIt>
204 void addRegs(InputIt first, InputIt last);
263 template<
class InputIt>
272 first->classValue() != (last-1)->classValue(),
273 "Attempt to add mixed type regs: %s and %s",
275 (last-1)->className());
276 switch (first->classValue()) {
296 panic(
"Unexpected RegClass (%s)",
305 DPRINTF(FreeList,
"Freeing register %i (%s).\n", freed_reg->
index(),
329 panic(
"Unexpected RegClass (%s)",
349 #endif // __CPU_O3_FREE_LIST_HH__
unsigned numFreeIntRegs() const
Returns the number of free integer registers.
std::queue< PhysRegIdPtr > freeRegs
The actual free list.
void addFloatReg(PhysRegIdPtr freed_reg)
Adds a fp register back to the free list.
std::string name() const
Gives the name of the freelist.
bool hasFreeVecRegs() const
Checks if there are any free vector registers.
SimpleFreeList * getCCList()
Returns a pointer to the condition-code free list.
@ VecElemClass
Vector Register Native Elem lane.
unsigned numFreeCCRegs() const
Returns the number of free cc registers.
Free list for a single class of registers (e.g., integer or floating point).
@ CCRegClass
Condition-code register.
UnifiedFreeList(const std::string &_my_name, PhysRegFile *_regFile)
Constructs a free list.
FreeList class that simply holds the list of free integer and floating point registers.
SimpleFreeList vecElemList
The list of free vector element registers.
void addIntReg(PhysRegIdPtr freed_reg)
Adds an integer register back to the free list.
void addCCReg(PhysRegIdPtr freed_reg)
Adds a cc register back to the free list.
bool hasFreeVecElems() const
Checks if there are any free vector registers.
unsigned numFreeVecElems() const
Returns the number of free vector registers.
unsigned numFreeRegs() const
Return the number of free registers on the list.
void addVecReg(PhysRegIdPtr freed_reg)
Adds a vector register back to the free list.
SimpleFreeList floatList
The list of free floating point registers.
@ FloatRegClass
Floating-point register.
void addRegs(InputIt first, InputIt last)
Add physical registers to the free list.
unsigned numFreeVecPredRegs() const
Returns the number of free predicate registers.
PhysRegFile * regFile
The register file object is used only to distinguish integer from floating-point physical register in...
SimpleFreeList predList
The list of free predicate registers.
Simple physical register file class.
void addRegs(InputIt first, InputIt last)
Adds a register back to the free list.
unsigned numFreeVecRegs() const
Returns the number of free vector registers.
void addReg(PhysRegIdPtr reg)
Add a physical register to the free list.
RegClassType classValue() const
Class accessor.
PhysRegIdPtr getVecElem()
Gets a free vector elemenet register.
PhysRegIdPtr getCCReg()
Gets a free cc register.
PhysRegIdPtr getReg()
Get the next available register from the free list.
@ IntRegClass
Integer register.
PhysRegIdPtr getVecReg()
Gets a free vector register.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
PhysRegIdPtr getFloatReg()
Gets a free fp register.
SimpleFreeList ccList
The list of free condition-code registers.
bool hasFreeRegs() const
True iff there are free registers on the list.
const char * className() const
Return a const char* with the register class name.
const std::string _name
The object name, for DPRINTF.
bool hasFreeFloatRegs() const
Checks if there are any free fp registers.
PhysRegIdPtr getVecPredReg()
Gets a free predicate register.
bool hasFreeIntRegs() const
Checks if there are any free integer registers.
void addVecPredReg(PhysRegIdPtr freed_reg)
Adds a predicate register back to the free list.
bool hasFreeCCRegs() const
Checks if there are any free cc registers.
@ VecRegClass
Vector Register.
bool hasFreeVecPredRegs() const
Checks if there are any free predicate registers.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
unsigned numFreeFloatRegs() const
Returns the number of free fp registers.
PhysRegIdPtr getIntReg()
Gets a free integer register.
SimpleFreeList intList
The list of free integer registers.
RegIndex index() const
Visible RegId methods.
void addReg(PhysRegIdPtr freed_reg)
Adds a register back to the free list.
#define panic(...)
This implements a cprintf based panic() function.
Unified register rename map for all classes of registers.
SimpleFreeList vecList
The following two are exclusive interfaces.
void addVecElem(PhysRegIdPtr freed_reg)
Adds a vector element register back to the free list.
Generated on Tue Dec 21 2021 11:34:26 for gem5 by doxygen 1.8.17