42#ifndef __CPU_O3_FREE_LIST_HH__
43#define __CPU_O3_FREE_LIST_HH__
54#include "debug/FreeList.hh"
62class UnifiedRenameMap;
86 template<
class InputIt>
89 std::for_each(first, last, [
this](
typename InputIt::value_type&
reg) {
165 template<
class InputIt>
169 std::for_each(first, last, [
this](
auto &
reg) {
addReg(&
reg); });
constexpr RegClassType classValue() const
Simple physical register file class.
Free list for a single class of registers (e.g., integer or floating point).
void addReg(PhysRegIdPtr reg)
Add a physical register to the free list.
std::queue< PhysRegIdPtr > freeRegs
The actual free list.
unsigned numFreeRegs() const
Return the number of free registers on the list.
PhysRegIdPtr getReg()
Get the next available register from the free list.
bool hasFreeRegs() const
True iff there are free registers on the list.
void addRegs(InputIt first, InputIt last)
Add physical registers to the free list.
FreeList class that simply holds the list of free integer and floating point registers.
std::array< SimpleFreeList, CCRegClass+1 > freeLists
std::string name() const
Gives the name of the freelist.
PhysRegFile * regFile
The register file object is used only to distinguish integer from floating-point physical register in...
UnifiedFreeList(const std::string &_my_name, PhysRegFile *_regFile)
Constructs a free list.
unsigned numFreeRegs(RegClassType type) const
Returns the number of free registers of type type.
PhysRegIdPtr getReg(RegClassType type)
Gets a free register of type type.
const std::string _name
The object name, for DPRINTF.
bool hasFreeRegs(RegClassType type) const
Checks if there are any free registers of type type.
void addRegs(InputIt first, InputIt last)
Adds a register back to the free list.
void addReg(PhysRegIdPtr freed_reg)
Adds a register back to the free list.
Unified register rename map for all classes of registers.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
RegClassType
Enumerate the classes of registers.