mem: Remove redundant findVictim() input argument
The patch (1) removes the redundant writeback argument from findVictim() (2) fixes the description of access() function Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
parent
575a73f4a1
commit
ffbdaa7cce
6 changed files with 6 additions and 8 deletions
2
src/mem/cache/cache.hh
vendored
2
src/mem/cache/cache.hh
vendored
|
@ -195,9 +195,9 @@ class Cache : public BaseCache
|
||||||
/**
|
/**
|
||||||
* Does all the processing necessary to perform the provided request.
|
* Does all the processing necessary to perform the provided request.
|
||||||
* @param pkt The memory request to perform.
|
* @param pkt The memory request to perform.
|
||||||
|
* @param blk The cache block to be updated.
|
||||||
* @param lat The latency of the access.
|
* @param lat The latency of the access.
|
||||||
* @param writebacks List for any writebacks that need to be performed.
|
* @param writebacks List for any writebacks that need to be performed.
|
||||||
* @param update True if the replacement data should be updated.
|
|
||||||
* @return Boolean indicating whether the request was satisfied.
|
* @return Boolean indicating whether the request was satisfied.
|
||||||
*/
|
*/
|
||||||
bool access(PacketPtr pkt, BlkType *&blk,
|
bool access(PacketPtr pkt, BlkType *&blk,
|
||||||
|
|
2
src/mem/cache/cache_impl.hh
vendored
2
src/mem/cache/cache_impl.hh
vendored
|
@ -1192,7 +1192,7 @@ typename Cache<TagStore>::BlkType*
|
||||||
Cache<TagStore>::allocateBlock(Addr addr, bool is_secure,
|
Cache<TagStore>::allocateBlock(Addr addr, bool is_secure,
|
||||||
PacketList &writebacks)
|
PacketList &writebacks)
|
||||||
{
|
{
|
||||||
BlkType *blk = tags->findVictim(addr, writebacks);
|
BlkType *blk = tags->findVictim(addr);
|
||||||
|
|
||||||
if (blk->isValid()) {
|
if (blk->isValid()) {
|
||||||
Addr repl_addr = tags->regenerateBlkAddr(blk->tag, blk->set);
|
Addr repl_addr = tags->regenerateBlkAddr(blk->tag, blk->set);
|
||||||
|
|
2
src/mem/cache/tags/fa_lru.cc
vendored
2
src/mem/cache/tags/fa_lru.cc
vendored
|
@ -224,7 +224,7 @@ FALRU::findBlock(Addr addr, bool is_secure) const
|
||||||
}
|
}
|
||||||
|
|
||||||
FALRUBlk*
|
FALRUBlk*
|
||||||
FALRU::findVictim(Addr addr, PacketList &writebacks)
|
FALRU::findVictim(Addr addr)
|
||||||
{
|
{
|
||||||
FALRUBlk * blk = tail;
|
FALRUBlk * blk = tail;
|
||||||
assert(blk->inCache == 0);
|
assert(blk->inCache == 0);
|
||||||
|
|
3
src/mem/cache/tags/fa_lru.hh
vendored
3
src/mem/cache/tags/fa_lru.hh
vendored
|
@ -203,10 +203,9 @@ public:
|
||||||
/**
|
/**
|
||||||
* Find a replacement block for the address provided.
|
* Find a replacement block for the address provided.
|
||||||
* @param pkt The request to a find a replacement candidate for.
|
* @param pkt The request to a find a replacement candidate for.
|
||||||
* @param writebacks List for any writebacks to be performed.
|
|
||||||
* @return The block to place the replacement in.
|
* @return The block to place the replacement in.
|
||||||
*/
|
*/
|
||||||
FALRUBlk* findVictim(Addr addr, PacketList & writebacks);
|
FALRUBlk* findVictim(Addr addr);
|
||||||
|
|
||||||
void insertBlock(PacketPtr pkt, BlkType *blk);
|
void insertBlock(PacketPtr pkt, BlkType *blk);
|
||||||
|
|
||||||
|
|
2
src/mem/cache/tags/lru.cc
vendored
2
src/mem/cache/tags/lru.cc
vendored
|
@ -172,7 +172,7 @@ LRU::findBlock(Addr addr, bool is_secure) const
|
||||||
}
|
}
|
||||||
|
|
||||||
LRU::BlkType*
|
LRU::BlkType*
|
||||||
LRU::findVictim(Addr addr, PacketList &writebacks)
|
LRU::findVictim(Addr addr)
|
||||||
{
|
{
|
||||||
unsigned set = extractSet(addr);
|
unsigned set = extractSet(addr);
|
||||||
// grab a replacement candidate
|
// grab a replacement candidate
|
||||||
|
|
3
src/mem/cache/tags/lru.hh
vendored
3
src/mem/cache/tags/lru.hh
vendored
|
@ -169,10 +169,9 @@ public:
|
||||||
/**
|
/**
|
||||||
* Find a block to evict for the address provided.
|
* Find a block to evict for the address provided.
|
||||||
* @param addr The addr to a find a replacement candidate for.
|
* @param addr The addr to a find a replacement candidate for.
|
||||||
* @param writebacks List for any writebacks to be performed.
|
|
||||||
* @return The candidate block.
|
* @return The candidate block.
|
||||||
*/
|
*/
|
||||||
BlkType* findVictim(Addr addr, PacketList &writebacks);
|
BlkType* findVictim(Addr addr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert the new block into the cache. For LRU this means inserting into
|
* Insert the new block into the cache. For LRU this means inserting into
|
||||||
|
|
Loading…
Reference in a new issue