48#include "debug/Rename.hh"
67 map.resize(reg_class.
numRegs());
81 renamed_reg = prev_reg;
88 renamed_reg = prev_reg;
92 map[arch_reg.
index()] = renamed_reg;
98 DPRINTF(
Rename,
"Renamed reg %d to physical reg %d (%d) old mapping was"
int getNumPinnedWrites() const
constexpr bool is(RegClassType reg_class) const
const RegIndex & flatIndex() const
Flat index accessor.
void decrNumPinnedWrites()
void setNumPinnedWrites(int numWrites)
void setNumPinnedWritesToComplete(int numWrites)
constexpr size_t numRegs() const
Register ID: describe an architectural register with its class and index.
constexpr bool is(RegClassType reg_class) const
constexpr RegIndex index() const
Index accessors.
int getNumPinnedWrites() const
Simple physical register file class.
Rename handles both single threaded and SMT rename.
Free list for a single class of registers (e.g., integer or floating point).
PhysRegIdPtr getReg()
Get the next available register from the free list.
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 ...
RenameInfo rename(const RegId &arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register.
SimpleFreeList * freeList
Pointer to the free list from which new physical registers should be allocated in rename()
std::pair< PhysRegIdPtr, PhysRegIdPtr > RenameInfo
Pair of a physical register and a physical register.
FreeList class that simply holds the list of free integer and floating point registers.
std::array< SimpleFreeList, CCRegClass+1 > freeLists
void init(const BaseISA::RegClasses ®Classes, PhysRegFile *_regFile, UnifiedFreeList *freeList)
Initializes rename map with given parameters.
PhysRegFile * regFile
The register file object is used only to get PhysRegIdPtr on MiscRegs, as they are stored in it.
bool canRename(DynInstPtr inst) const
Return whether there are enough registers to serve the request.
std::array< SimpleRenameMap, CCRegClass+1 > renameMaps
const FlagsType init
This Stat is Initialized.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
RegClassType
Enumerate the classes of registers.