gem5  v20.1.0.0
Public Member Functions | Public Attributes | Private Member Functions | List of all members
Prefetcher::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. More...
 
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. More...
 
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. More...
 

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. More...
 

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 74 of file pif.hh.

Constructor & Destructor Documentation

◆ CompactorEntry() [1/2]

Prefetcher::PIF::CompactorEntry::CompactorEntry ( )
inline

Definition at line 78 of file pif.hh.

◆ CompactorEntry() [2/2]

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

Definition at line 52 of file pif.cc.

References addr, prec, succ, and trigger.

Member Function Documentation

◆ distanceFromTrigger()

Addr Prefetcher::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 61 of file pif.cc.

References X86ISA::trigger.

◆ getPredictedAddresses()

void Prefetcher::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 106 of file pif.cc.

References ArmISA::i, and X86ISA::trigger.

◆ hasAddress()

bool Prefetcher::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 90 of file pif.cc.

References X86ISA::trigger.

◆ inSameSpatialRegion()

bool Prefetcher::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 72 of file pif.cc.

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

Referenced by Prefetcher::PIF::notifyRetiredInst().

Member Data Documentation

◆ prec

std::vector<bool> Prefetcher::PIF::CompactorEntry::prec

Definition at line 76 of file pif.hh.

Referenced by CompactorEntry().

◆ succ

std::vector<bool> Prefetcher::PIF::CompactorEntry::succ

Definition at line 77 of file pif.hh.

Referenced by CompactorEntry().

◆ trigger

Addr Prefetcher::PIF::CompactorEntry::trigger

Definition at line 75 of file pif.hh.

Referenced by CompactorEntry(), and Prefetcher::PIF::notifyRetiredInst().


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

Generated on Wed Sep 30 2020 14:03:07 for gem5 by doxygen 1.8.17