Go to the documentation of this file.
42 #ifndef __CPU_O3_RENAME_MAP_HH__
43 #define __CPU_O3_RENAME_MAP_HH__
124 assert(arch_reg.
index() <=
map.size());
137 assert(arch_reg.
index() <=
map.size());
235 return renameMaps[reg_class].lookup(arch_reg);
255 assert(phys_reg ==
lookup(arch_reg));
271 auto min_free = std::numeric_limits<unsigned>::max();
274 if (map.numArchRegs())
275 min_free = std::min(min_free, map.numFreeEntries());
295 #endif //__CPU_O3_RENAME_MAP_HH__
constexpr bool isRenameable() const
Return true if this register can be renamed.
SimpleRenameMap::RenameInfo RenameInfo
Free list for a single class of registers (e.g., integer or floating point).
const_iterator begin() const
const_iterator end() const
unsigned numFreeEntries() const
Return the number of free entries on the associated free list.
SimpleFreeList * freeList
Pointer to the free list from which new physical registers should be allocated in rename()
iterator end()
Forward end/cend to the map.
Arch2PhysMap::iterator iterator
FreeList class that simply holds the list of free integer and floating point registers.
unsigned numFreeRegs() const
Return the number of free registers on the list.
unsigned numFreeEntries(RegClassType type) const
iterator begin()
Forward begin/cbegin to the map.
Simple physical register file class.
const_iterator cend() const
PhysRegIdPtr lookup(const RegId &arch_reg) const
Look up the physical register mapped to an architectural register.
size_t numArchRegs() const
UnifiedRenameMap()
Default constructor.
~UnifiedRenameMap()
Destructor.
constexpr bool is(RegClassType reg_class) const
RenameInfo rename(const RegId &arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register.
std::array< SimpleRenameMap, CCRegClass+1 > renameMaps
static PhysRegId invalidPhysRegId
std::pair< PhysRegIdPtr, PhysRegIdPtr > RenameInfo
Pair of a physical register and a physical register.
void init(const RegClass ®_class, SimpleFreeList *_freeList)
Because we have an array of rename maps (one per thread) in the CPU, it's awkward to initialize this ...
unsigned numFreeEntries() const
Return the minimum number of free entries across all of the register classes.
RegClassType
Enumerate the classes of registers.
@ MiscRegClass
Control (misc) register.
PhysRegIdPtr getMiscRegId(RegIndex reg_idx)
Gets a misc register PhysRegIdPtr.
bool canRename(DynInstPtr inst) const
Return whether there are enough registers to serve the request.
PhysRegIdPtr lookup(const RegId &arch_reg) const
Look up the physical register mapped to an architectural register.
const_iterator cbegin() const
void setEntry(const RegId &arch_reg, PhysRegIdPtr phys_reg)
Update rename map with a specific mapping.
constexpr RegIndex index() const
Index accessors.
Arch2PhysMap::const_iterator const_iterator
Register rename map for a single class of registers (e.g., integer or floating point).
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
constexpr RegClassType classValue() const
void init(const BaseISA::RegClasses ®Classes, PhysRegFile *_regFile, UnifiedFreeList *freeList)
Initializes rename map with given parameters.
RenameInfo rename(const RegId &arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register.
Arch2PhysMap map
The acutal arch-to-phys register map.
PhysRegFile * regFile
The register file object is used only to get PhysRegIdPtr on MiscRegs, as they are stored in it.
Register ID: describe an architectural register with its class and index.
void setEntry(const RegId &arch_reg, PhysRegIdPtr phys_reg)
Update rename map with a specific mapping.
Unified register rename map for all classes of registers.
Generated on Sun Jul 30 2023 01:56:53 for gem5 by doxygen 1.8.17