gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
template<class InputIt >
void addRegs (InputIt first, InputIt last)
 Add physical registers to the free list.
 
PhysRegIdPtr getReg ()
 Get the next available register from the free list.
 
unsigned numFreeRegs () const
 Return the number of free registers on the list.
 
bool hasFreeRegs () const
 True iff there are free registers on the list.
 

Private Attributes

std::queue< PhysRegIdPtrfreeRegs
 The actual free list.
 

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 Tue Jun 18 2024 16:24:20 for gem5 by doxygen 1.11.0