gem5  v22.1.0.0
Public Member Functions | Private Attributes | List of all members
gem5::o3::SimpleFreeList Class Reference

Free list for a single class of registers (e.g., integer or floating point). More...

#include <free_list.hh>

Public Member Functions

 SimpleFreeList ()
 
void addReg (PhysRegIdPtr reg)
 Add a physical register to the free list. More...
 
template<class InputIt >
void addRegs (InputIt first, InputIt last)
 Add physical registers to the free list. More...
 
PhysRegIdPtr getReg ()
 Get the next available register from the free list. More...
 
unsigned numFreeRegs () const
 Return the number of free registers on the list. More...
 
bool hasFreeRegs () const
 True iff there are free registers on the list. More...
 

Private Attributes

std::queue< PhysRegIdPtrfreeRegs
 The actual free list. More...
 

Detailed Description

Free list 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 free_list.hh.

Constructor & Destructor Documentation

◆ SimpleFreeList()

gem5::o3::SimpleFreeList::SimpleFreeList ( )
inline

Definition at line 80 of file free_list.hh.

Member Function Documentation

◆ addReg()

void gem5::o3::SimpleFreeList::addReg ( PhysRegIdPtr  reg)
inline

Add a physical register to the free list.

Definition at line 83 of file free_list.hh.

References freeRegs, and gem5::X86ISA::reg.

◆ addRegs()

template<class InputIt >
void gem5::o3::SimpleFreeList::addRegs ( InputIt  first,
InputIt  last 
)
inline

Add physical registers to the free list.

Definition at line 88 of file free_list.hh.

References freeRegs, and gem5::X86ISA::reg.

◆ getReg()

PhysRegIdPtr gem5::o3::SimpleFreeList::getReg ( )
inline

Get the next available register from the free list.

Definition at line 95 of file free_list.hh.

References freeRegs.

Referenced by gem5::o3::SimpleRenameMap::rename().

◆ hasFreeRegs()

bool gem5::o3::SimpleFreeList::hasFreeRegs ( ) const
inline

True iff there are free registers on the list.

Definition at line 107 of file free_list.hh.

References freeRegs.

◆ numFreeRegs()

unsigned gem5::o3::SimpleFreeList::numFreeRegs ( ) const
inline

Return the number of free registers on the list.

Definition at line 104 of file free_list.hh.

References freeRegs.

Referenced by gem5::o3::SimpleRenameMap::numFreeEntries().

Member Data Documentation

◆ freeRegs

std::queue<PhysRegIdPtr> gem5::o3::SimpleFreeList::freeRegs
private

The actual free list.

Definition at line 76 of file free_list.hh.

Referenced by addReg(), addRegs(), getReg(), hasFreeRegs(), and numFreeRegs().


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

Generated on Wed Dec 21 2022 10:24:18 for gem5 by doxygen 1.9.1