gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::prefetch::PIF::CompactorEntry Struct Reference

The compactor tracks retired instructions addresses, leveraging the spatial and temporal locality among instructions for compaction. More...

Public Member Functions

 CompactorEntry ()
 
 CompactorEntry (Addr, unsigned int, unsigned int)
 
bool inSameSpatialRegion (Addr addr, unsigned int log_blk_size, bool update)
 Checks if a given address is in the same defined spatial region as the compactor entry.
 
bool hasAddress (Addr target, unsigned int log_blk_size) const
 Checks if the provided address is contained in this spatial region and if its corresponding bit vector entry is set.
 
void getPredictedAddresses (unsigned int log_blk_size, std::vector< AddrPriority > &addresses) const
 Fills the provided vector with the predicted addresses using the recorded bit vectors of the entry.
 

Public Attributes

Addr trigger
 
std::vector< bool > prec
 
std::vector< bool > succ
 

Private Member Functions

Addr distanceFromTrigger (Addr addr, unsigned int log_blk_size) const
 Computes the distance, in cache blocks, from an address to the trigger of the entry.
 

Detailed Description

The compactor tracks retired instructions addresses, leveraging the spatial and temporal locality among instructions for compaction.

It comprises the spatial and temporal compaction mechanisms.

Taking advantage of the spatial locality across instruction blocks, the spatial compactor combines instruction-block addresses that fall within a 'spatial region', a group of adjacent instruction blocks. When an instruction outside the current spatial region retires, the existing spatial region is sent to the temporal compactor.

The temporal compactor tracks a small number of the most-recently-observed spatial region records.

Definition at line 78 of file pif.hh.

Constructor & Destructor Documentation

◆ CompactorEntry() [1/2]

gem5::prefetch::PIF::CompactorEntry::CompactorEntry ( )
inline

Definition at line 83 of file pif.hh.

◆ CompactorEntry() [2/2]

gem5::prefetch::PIF::CompactorEntry::CompactorEntry ( Addr addr,
unsigned int prec_size,
unsigned int succ_size )

Definition at line 57 of file pif.cc.

References gem5::X86ISA::addr, prec, succ, and trigger.

Member Function Documentation

◆ distanceFromTrigger()

Addr gem5::prefetch::PIF::CompactorEntry::distanceFromTrigger ( Addr addr,
unsigned int log_blk_size ) const
private

Computes the distance, in cache blocks, from an address to the trigger of the entry.

Parameters
addraddress to compute the distance from the trigger
log_blk_distancelog_2(block size of the cache)
Returns
distance in cache blocks from the address to the trigger

Definition at line 66 of file pif.cc.

References gem5::X86ISA::trigger.

◆ getPredictedAddresses()

void gem5::prefetch::PIF::CompactorEntry::getPredictedAddresses ( unsigned int log_blk_size,
std::vector< AddrPriority > & addresses ) const

Fills the provided vector with the predicted addresses using the recorded bit vectors of the entry.

Parameters
log_blk_distancelog_2(block size of the cache)
addressesreference to a vector to add the generated addresses

Definition at line 111 of file pif.cc.

References gem5::ArmISA::i, gem5::RiscvISA::succ, and gem5::X86ISA::trigger.

◆ hasAddress()

bool gem5::prefetch::PIF::CompactorEntry::hasAddress ( Addr target,
unsigned int log_blk_size ) const

Checks if the provided address is contained in this spatial region and if its corresponding bit vector entry is set.

Parameters
targetaddress to check
log_blk_distancelog_2(block size of the cache)
Returns
TRUE if target has its bit set

Definition at line 95 of file pif.cc.

References gem5::RiscvISA::succ, and gem5::X86ISA::trigger.

◆ inSameSpatialRegion()

bool gem5::prefetch::PIF::CompactorEntry::inSameSpatialRegion ( Addr addr,
unsigned int log_blk_size,
bool update )

Checks if a given address is in the same defined spatial region as the compactor entry.

Parameters
addrAddress to check if it's inside the spatial region
log_blk_distancelog_2(block size of the cache)
updateif true, set the corresponding succ/prec entry
Returns
TRUE if they are in the same spatial region, FALSE otherwise

Definition at line 77 of file pif.cc.

References gem5::MipsISA::pc, gem5::RiscvISA::succ, gem5::X86ISA::trigger, and gem5::Clocked::update().

Referenced by gem5::prefetch::PIF::notifyRetiredInst().

Member Data Documentation

◆ prec

std::vector<bool> gem5::prefetch::PIF::CompactorEntry::prec

Definition at line 81 of file pif.hh.

Referenced by CompactorEntry().

◆ succ

std::vector<bool> gem5::prefetch::PIF::CompactorEntry::succ

Definition at line 82 of file pif.hh.

Referenced by CompactorEntry().

◆ trigger

Addr gem5::prefetch::PIF::CompactorEntry::trigger

Definition at line 80 of file pif.hh.

Referenced by CompactorEntry(), and gem5::prefetch::PIF::notifyRetiredInst().


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

Generated on Tue Jun 18 2024 16:24:21 for gem5 by doxygen 1.11.0