gem5 v24.0.0.0
|
Register rename map for a single class of registers (e.g., integer or floating point). More...
#include <rename_map.hh>
Public Types | |
using | iterator = Arch2PhysMap::iterator |
using | const_iterator = Arch2PhysMap::const_iterator |
typedef std::pair< PhysRegIdPtr, PhysRegIdPtr > | RenameInfo |
Pair of a physical register and a physical register. | |
Public Member Functions | |
SimpleRenameMap () | |
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 object via the constructor. | |
RenameInfo | rename (const RegId &arch_reg) |
Tell rename map to get a new free physical register to remap the specified architectural register. | |
PhysRegIdPtr | lookup (const RegId &arch_reg) const |
Look up the physical register mapped to an architectural register. | |
void | setEntry (const RegId &arch_reg, PhysRegIdPtr phys_reg) |
Update rename map with a specific mapping. | |
unsigned | numFreeEntries () const |
Return the number of free entries on the associated free list. | |
size_t | numArchRegs () const |
iterator | begin () |
Forward begin/cbegin to the map. | |
const_iterator | begin () const |
const_iterator | cbegin () const |
iterator | end () |
Forward end/cend to the map. | |
const_iterator | end () const |
const_iterator | cend () const |
Private Types | |
using | Arch2PhysMap = std::vector<PhysRegIdPtr> |
Private Attributes | |
Arch2PhysMap | map |
The acutal arch-to-phys register map. | |
SimpleFreeList * | freeList |
Pointer to the free list from which new physical registers should be allocated in rename() | |
Register rename map for a single class of registers (e.g., integer or floating point).
Because the register class is implicitly determined by the rename map instance being accessed, all architectural register index parameters and values in this class are relative (e.g., fp2 is just index 2).
Definition at line 71 of file rename_map.hh.
|
private |
Definition at line 74 of file rename_map.hh.
using gem5::o3::SimpleRenameMap::const_iterator = Arch2PhysMap::const_iterator |
Definition at line 79 of file rename_map.hh.
using gem5::o3::SimpleRenameMap::iterator = Arch2PhysMap::iterator |
Definition at line 78 of file rename_map.hh.
Pair of a physical register and a physical register.
Used to return the physical register that a logical register has been renamed to, and the previous physical register that the same logical register was previously mapped to.
Definition at line 105 of file rename_map.hh.
gem5::o3::SimpleRenameMap::SimpleRenameMap | ( | ) |
Definition at line 56 of file rename_map.cc.
|
inline |
Forward begin/cbegin to the map.
Definition at line 148 of file rename_map.hh.
|
inline |
Definition at line 149 of file rename_map.hh.
|
inline |
Definition at line 150 of file rename_map.hh.
|
inline |
Definition at line 157 of file rename_map.hh.
|
inline |
Forward end/cend to the map.
Definition at line 155 of file rename_map.hh.
|
inline |
Definition at line 156 of file rename_map.hh.
void gem5::o3::SimpleRenameMap::init | ( | const RegClass & | reg_class, |
SimpleFreeList * | _freeList ) |
Because we have an array of rename maps (one per thread) in the CPU, it's awkward to initialize this object via the constructor.
Instead, this method is used for initialization.
Definition at line 62 of file rename_map.cc.
References freeList, and gem5::RegClass::numRegs().
|
inline |
Look up the physical register mapped to an architectural register.
arch_reg | The architectural register to look up. |
Definition at line 122 of file rename_map.hh.
References gem5::RegId::index().
|
inline |
Definition at line 144 of file rename_map.hh.
|
inline |
Return the number of free entries on the associated free list.
Definition at line 142 of file rename_map.hh.
References freeList, and gem5::o3::SimpleFreeList::numFreeRegs().
SimpleRenameMap::RenameInfo gem5::o3::SimpleRenameMap::rename | ( | const RegId & | arch_reg | ) |
Tell rename map to get a new free physical register to remap the specified architectural register.
arch_reg | The architectural register to remap. |
Definition at line 72 of file rename_map.cc.
References gem5::PhysRegId::decrNumPinnedWrites(), DPRINTF, gem5::PhysRegId::flatIndex(), freeList, gem5::PhysRegId::getNumPinnedWrites(), gem5::RegId::getNumPinnedWrites(), gem5::o3::SimpleFreeList::getReg(), gem5::RegId::index(), gem5::InvalidRegClass, gem5::PhysRegId::is(), gem5::RegId::is(), gem5::PhysRegId::setNumPinnedWrites(), and gem5::PhysRegId::setNumPinnedWritesToComplete().
|
inline |
Update rename map with a specific mapping.
Generally used to roll back to old mappings on a squash.
arch_reg | The architectural register to remap. |
phys_reg | The physical register to remap it to. |
Definition at line 135 of file rename_map.hh.
References gem5::RegId::index().
|
private |
Pointer to the free list from which new physical registers should be allocated in rename()
Definition at line 86 of file rename_map.hh.
Referenced by init(), numFreeEntries(), and rename().
|
private |
The acutal arch-to-phys register map.
Definition at line 76 of file rename_map.hh.