gem5  v21.2.1.1
Public Types | Public Member Functions | Private Attributes | List of all members
gem5::o3::UnifiedRenameMap Class Reference

Unified register rename map for all classes of registers. More...

#include <rename_map.hh>

Public Types

typedef SimpleRenameMap::RenameInfo RenameInfo
 

Public Member Functions

 UnifiedRenameMap ()
 Default constructor. More...
 
 ~UnifiedRenameMap ()
 Destructor. More...
 
void init (const BaseISA::RegClasses &regClasses, PhysRegFile *_regFile, UnifiedFreeList *freeList)
 Initializes rename map with given parameters. More...
 
RenameInfo rename (const RegId &arch_reg)
 Tell rename map to get a new free physical register to remap the specified architectural register. More...
 
PhysRegIdPtr lookup (const RegId &arch_reg) const
 Look up the physical register mapped to an architectural register. More...
 
void setEntry (const RegId &arch_reg, PhysRegIdPtr phys_reg)
 Update rename map with a specific mapping. More...
 
unsigned numFreeEntries () const
 Return the minimum number of free entries across all of the register classes. More...
 
unsigned numFreeIntEntries () const
 
unsigned numFreeFloatEntries () const
 
unsigned numFreeVecEntries () const
 
unsigned numFreeVecElemEntries () const
 
unsigned numFreePredEntries () const
 
unsigned numFreeCCEntries () const
 
bool canRename (uint32_t intRegs, uint32_t floatRegs, uint32_t vectorRegs, uint32_t vecElemRegs, uint32_t vecPredRegs, uint32_t ccRegs) const
 Return whether there are enough registers to serve the request. More...
 

Private Attributes

SimpleRenameMap intMap
 The integer register rename map. More...
 
SimpleRenameMap floatMap
 The floating-point register rename map. More...
 
SimpleRenameMap ccMap
 The condition-code register rename map. More...
 
SimpleRenameMap vecMap
 The vector register rename map. More...
 
SimpleRenameMap vecElemMap
 The vector element register rename map. More...
 
SimpleRenameMap predMap
 The predicate register rename map. More...
 
PhysRegFileregFile
 The register file object is used only to get PhysRegIdPtr on MiscRegs, as they are stored in it. More...
 

Detailed Description

Unified register rename map for all classes of registers.

Wraps a set of class-specific rename maps. Methods that do not specify a register class (e.g., rename()) take register ids, while methods that do specify a register class (e.g., renameInt()) take register indices.

Definition at line 173 of file rename_map.hh.

Member Typedef Documentation

◆ RenameInfo

Definition at line 202 of file rename_map.hh.

Constructor & Destructor Documentation

◆ UnifiedRenameMap()

gem5::o3::UnifiedRenameMap::UnifiedRenameMap ( )
inline

Default constructor.

init() must be called prior to use.

Definition at line 205 of file rename_map.hh.

◆ ~UnifiedRenameMap()

gem5::o3::UnifiedRenameMap::~UnifiedRenameMap ( )
inline

Destructor.

Definition at line 208 of file rename_map.hh.

Member Function Documentation

◆ canRename()

bool gem5::o3::UnifiedRenameMap::canRename ( uint32_t  intRegs,
uint32_t  floatRegs,
uint32_t  vectorRegs,
uint32_t  vecElemRegs,
uint32_t  vecPredRegs,
uint32_t  ccRegs 
) const
inline

Return whether there are enough registers to serve the request.

Definition at line 369 of file rename_map.hh.

References ccMap, floatMap, intMap, gem5::o3::SimpleRenameMap::numFreeEntries(), predMap, vecElemMap, and vecMap.

◆ init()

void gem5::o3::UnifiedRenameMap::init ( const BaseISA::RegClasses regClasses,
PhysRegFile _regFile,
UnifiedFreeList freeList 
)

◆ lookup()

PhysRegIdPtr gem5::o3::UnifiedRenameMap::lookup ( const RegId arch_reg) const
inline

◆ numFreeCCEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreeCCEntries ( ) const
inline

Definition at line 363 of file rename_map.hh.

References ccMap, and gem5::o3::SimpleRenameMap::numFreeEntries().

◆ numFreeEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreeEntries ( ) const
inline

Return the minimum number of free entries across all of the register classes.

The minimum is used so we guarantee that this number of entries is available regardless of which class of registers is requested.

Definition at line 345 of file rename_map.hh.

References floatMap, intMap, gem5::o3::SimpleRenameMap::numFreeEntries(), predMap, vecElemMap, and vecMap.

◆ numFreeFloatEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreeFloatEntries ( ) const
inline

Definition at line 355 of file rename_map.hh.

References floatMap, and gem5::o3::SimpleRenameMap::numFreeEntries().

◆ numFreeIntEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreeIntEntries ( ) const
inline

Definition at line 354 of file rename_map.hh.

References intMap, and gem5::o3::SimpleRenameMap::numFreeEntries().

◆ numFreePredEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreePredEntries ( ) const
inline

Definition at line 362 of file rename_map.hh.

References gem5::o3::SimpleRenameMap::numFreeEntries(), and predMap.

◆ numFreeVecElemEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreeVecElemEntries ( ) const
inline

Definition at line 358 of file rename_map.hh.

References gem5::o3::SimpleRenameMap::numFreeEntries(), and vecElemMap.

◆ numFreeVecEntries()

unsigned gem5::o3::UnifiedRenameMap::numFreeVecEntries ( ) const
inline

Definition at line 356 of file rename_map.hh.

References gem5::o3::SimpleRenameMap::numFreeEntries(), and vecMap.

◆ rename()

RenameInfo gem5::o3::UnifiedRenameMap::rename ( const RegId arch_reg)
inline

Tell rename map to get a new free physical register to remap the specified architectural register.

This version takes a RegId and reads the appropriate class-specific rename table.

Parameters
arch_regThe architectural register id to remap.
Returns
A RenameInfo pair indicating both the new and previous physical registers.

Definition at line 223 of file rename_map.hh.

References ccMap, gem5::CCRegClass, gem5::RegId::className(), gem5::RegId::classValue(), floatMap, gem5::FloatRegClass, intMap, gem5::IntRegClass, lookup(), gem5::MiscRegClass, panic, predMap, gem5::o3::SimpleRenameMap::rename(), gem5::VecElemClass, vecElemMap, vecMap, gem5::VecPredRegClass, and gem5::VecRegClass.

Referenced by gem5::o3::Rename::renameDestRegs().

◆ setEntry()

void gem5::o3::UnifiedRenameMap::setEntry ( const RegId arch_reg,
PhysRegIdPtr  phys_reg 
)
inline

Update rename map with a specific mapping.

Generally used to roll back to old mappings on a squash. This version takes a flattened architectural register id and calls the appropriate class-specific rename table.

Parameters
arch_regThe architectural register to remap.
phys_regThe physical register to remap it to.

Definition at line 302 of file rename_map.hh.

References ccMap, gem5::CCRegClass, gem5::RegId::className(), gem5::RegId::classValue(), floatMap, gem5::FloatRegClass, intMap, gem5::IntRegClass, gem5::PhysRegId::is(), lookup(), gem5::MiscRegClass, panic, predMap, gem5::o3::SimpleRenameMap::setEntry(), gem5::VecElemClass, vecElemMap, vecMap, gem5::VecPredRegClass, and gem5::VecRegClass.

Referenced by gem5::o3::Commit::commitHead(), gem5::o3::Rename::doSquash(), and gem5::o3::CPU::insertThread().

Member Data Documentation

◆ ccMap

SimpleRenameMap gem5::o3::UnifiedRenameMap::ccMap
private

The condition-code register rename map.

Definition at line 183 of file rename_map.hh.

Referenced by canRename(), init(), lookup(), numFreeCCEntries(), rename(), and setEntry().

◆ floatMap

SimpleRenameMap gem5::o3::UnifiedRenameMap::floatMap
private

The floating-point register rename map.

Definition at line 180 of file rename_map.hh.

Referenced by canRename(), init(), lookup(), numFreeEntries(), numFreeFloatEntries(), rename(), and setEntry().

◆ intMap

SimpleRenameMap gem5::o3::UnifiedRenameMap::intMap
private

The integer register rename map.

Definition at line 177 of file rename_map.hh.

Referenced by canRename(), init(), lookup(), numFreeEntries(), numFreeIntEntries(), rename(), and setEntry().

◆ predMap

SimpleRenameMap gem5::o3::UnifiedRenameMap::predMap
private

The predicate register rename map.

Definition at line 192 of file rename_map.hh.

Referenced by canRename(), init(), lookup(), numFreeEntries(), numFreePredEntries(), rename(), and setEntry().

◆ regFile

PhysRegFile* gem5::o3::UnifiedRenameMap::regFile
private

The register file object is used only to get PhysRegIdPtr on MiscRegs, as they are stored in it.

Definition at line 198 of file rename_map.hh.

Referenced by init(), and lookup().

◆ vecElemMap

SimpleRenameMap gem5::o3::UnifiedRenameMap::vecElemMap
private

The vector element register rename map.

Definition at line 189 of file rename_map.hh.

Referenced by canRename(), init(), lookup(), numFreeEntries(), numFreeVecElemEntries(), rename(), and setEntry().

◆ vecMap

SimpleRenameMap gem5::o3::UnifiedRenameMap::vecMap
private

The vector register rename map.

Definition at line 186 of file rename_map.hh.

Referenced by canRename(), init(), lookup(), numFreeEntries(), numFreeVecEntries(), rename(), and setEntry().


The documentation for this class was generated from the following files:

Generated on Wed May 4 2022 12:15:48 for gem5 by doxygen 1.8.17