Go to the documentation of this file.
47 #include "debug/Rename.hh"
81 renamed_reg = prev_reg;
86 DPRINTF(Rename,
"Renaming pinned reg, numPinnedWrites %d\n",
88 renamed_reg = prev_reg;
98 DPRINTF(Rename,
"Renamed reg %d to physical reg %d (%d) old mapping was"
141 "The free list is already tracking Vec elems");
144 "The free list has lost vector registers");
150 freeList->
addRegs(range.first, range.second);
153 }
else if (
vecMode == Enums::Full) {
157 "The free list is already tracking full Vec");
161 "The free list has lost vector register elements");
175 if (newVecMode == Enums::Elem &&
vecMode == Enums::Full) {
185 for (
auto phys_elem = range.first;
186 phys_elem < range.second; idx++, phys_elem++) {
193 }
else if (newVecMode == Enums::Full &&
vecMode == Enums::Elem) {
int getNumPinnedWrites() const
unsigned numVecElemPhysRegs() const
SimpleFreeList * freeList
Pointer to the free list from which new physical registers should be allocated in rename()
VecReg::Container VecRegContainer
@ VecElemClass
Vector Register Native Elem lane.
const VecElem & readVecElem(PhysRegIdPtr phys_reg) const
Reads a vector element.
void addRegs(InputIt first, InputIt last)
Adds a register back to the free list.
SimpleRenameMap intMap
The integer register rename map.
SimpleFreeList ccList
The list of free condition-code registers.
bool isZeroReg() const
Check if this is the zero register.
void switchFreeList(UnifiedFreeList *freeList)
Switch freeList of registers from Full to Elem or vicevers depending on vecMode (vector renaming mode...
const PhysRegIndex & flatIndex() const
Flat index accessor.
PhysRegFile * regFile
The register file object is used only to get PhysRegIdPtr on MiscRegs, as they are stored in it.
Simple physical register file class.
SimpleFreeList vecList
The following two are exclusive interfaces.
void switchMode(VecMode newVecMode)
Set vector mode to Full or Elem.
void setEntry(const RegId &arch_reg, PhysRegIdPtr phys_reg)
Update rename map with a specific mapping.
IdRange getRegElemIds(PhysRegIdPtr reg)
Get the PhysRegIds of the elems of a vector register.
SimpleFreeList floatList
The list of free floating point registers.
Register ID: describe an architectural register with its class and index.
void init(unsigned size, SimpleFreeList *_freeList, RegIndex _zeroReg)
Because we have an array of rename maps (one per thread) in the CPU, it's awkward to initialize this ...
SimpleRenameMap vecMap
The vector register rename map.
SimpleRenameMap vecElemMap
The vector element register rename map.
void init(PhysRegFile *_regFile, RegIndex _intZeroReg, RegIndex _floatZeroReg, UnifiedFreeList *freeList, VecMode _mode)
Initializes rename map with given parameters.
constexpr unsigned NumVecElemPerVecReg
void setNumPinnedWritesToComplete(int numWrites)
FreeList class that simply holds the list of free integer and floating point registers.
void decrNumPinnedWrites()
SimpleRenameMap ccMap
The condition-code register rename map.
unsigned numFreeVecRegs() const
Returns the number of free vector registers.
PhysRegIdPtr lookup(const RegId &arch_reg) const
Look up the physical register mapped to an architectural register.
std::pair< PhysRegIdPtr, PhysRegIdPtr > RenameInfo
Pair of a physical register and a physical register.
SimpleRenameMap floatMap
The floating-point register rename map.
void setVecReg(PhysRegIdPtr phys_reg, const VecRegContainer &val)
Sets a vector register to the given value.
SimpleRenameMap predMap
The predicate register rename map.
int getNumPinnedWrites() const
unsigned numFreeVecElems() const
Returns the number of free vector registers.
@ IntRegClass
Integer register.
Enums::VecRegRenameMode VecMode
bool hasFreeVecElems() const
Checks if there are any free vector registers.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
@ VecRegClass
Vector Register.
RenameInfo rename(const RegId &arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register.
unsigned numVecPhysRegs() const
Overload hash function for BasicBlockRange type.
SimpleFreeList predList
The list of free predicate registers.
Arch2PhysMap map
The acutal arch-to-phys register map.
PhysRegIdPtr getReg()
Get the next available register from the free list.
void setNumPinnedWrites(int numWrites)
PhysRegIdPtr getTrueId(PhysRegIdPtr reg)
Get the true physical register id.
RegIndex flatIndex() const
Index flattening.
bool hasFreeVecRegs() const
Checks if there are any free vector registers.
SimpleFreeList vecElemList
The list of free vector element registers.
SimpleFreeList intList
The list of free integer registers.
PhysRegIdPtr getVecElem()
Gets a free vector elemenet register.
RegId zeroReg
The architectural index of the zero register.
Free list for a single class of registers (e.g., integer or floating point).
IdRange getRegIds(RegClass cls)
Get the PhysRegIds of the elems of all vector registers.
PhysRegIdPtr getVecReg()
Gets a free vector register.
static constexpr uint32_t NVecElems
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17