mem: Remove redundant findVictim() input argument
authorAmin Farmahini <aminfar@gmail.com>
Wed, 29 Jan 2014 00:00:50 +0000 (18:00 -0600)
committerAmin Farmahini <aminfar@gmail.com>
Wed, 29 Jan 2014 00:00:50 +0000 (18:00 -0600)
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>

src/mem/cache/cache.hh
src/mem/cache/cache_impl.hh
src/mem/cache/tags/fa_lru.cc
src/mem/cache/tags/fa_lru.hh
src/mem/cache/tags/lru.cc
src/mem/cache/tags/lru.hh

index 60f3650e7222260720fe01e747e932413aaf91ca..3d7fc8fe3bd4e509d682cc19a3e960edf9e53e18 100644 (file)
@@ -195,9 +195,9 @@ class Cache : public BaseCache
     /**
      * Does all the processing necessary to perform the provided request.
      * @param pkt The memory request to perform.
+     * @param blk The cache block to be updated.
      * @param lat The latency of the access.
      * @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.
      */
     bool access(PacketPtr pkt, BlkType *&blk,
index acd3ef64fe920a4d8f32465d477da7844b353f6d..b264733363cf20ce1dce174db48e7bf79afb26f3 100644 (file)
@@ -1192,7 +1192,7 @@ typename Cache<TagStore>::BlkType*
 Cache<TagStore>::allocateBlock(Addr addr, bool is_secure,
                                PacketList &writebacks)
 {
-    BlkType *blk = tags->findVictim(addr, writebacks);
+    BlkType *blk = tags->findVictim(addr);
 
     if (blk->isValid()) {
         Addr repl_addr = tags->regenerateBlkAddr(blk->tag, blk->set);
index c3e2b66e41ed7a39c4d03b7264e3e69334b27327..6526aadb803a669d2fc37c8427889db3d0ab3a35 100644 (file)
@@ -224,7 +224,7 @@ FALRU::findBlock(Addr addr, bool is_secure) const
 }
 
 FALRUBlk*
-FALRU::findVictim(Addr addr, PacketList &writebacks)
+FALRU::findVictim(Addr addr)
 {
     FALRUBlk * blk = tail;
     assert(blk->inCache == 0);
index 1465bd8619ec49b52f162bb23bc242f5630cfee2..ef13b2c79ee5af61946f4950ec1c99b9051a20a8 100644 (file)
@@ -203,10 +203,9 @@ public:
     /**
      * Find a replacement block for the address provided.
      * @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.
      */
-    FALRUBlk* findVictim(Addr addr, PacketList & writebacks);
+    FALRUBlk* findVictim(Addr addr);
 
     void insertBlock(PacketPtr pkt, BlkType *blk);
 
index ff0596987a5e9cd40afc0bf890d20d18fbac48c1..744d7224a2082f747fae564b2f02e836fb3cdb07 100644 (file)
@@ -172,7 +172,7 @@ LRU::findBlock(Addr addr, bool is_secure) const
 }
 
 LRU::BlkType*
-LRU::findVictim(Addr addr, PacketList &writebacks)
+LRU::findVictim(Addr addr)
 {
     unsigned set = extractSet(addr);
     // grab a replacement candidate
index 9d438497abccdbaf1871d6a7a5d6525233a4c14f..121bdb292469d7cf864ca1890057ffcdf0eb5e49 100644 (file)
@@ -169,10 +169,9 @@ public:
     /**
      * Find a block to evict for the address provided.
      * @param addr The addr to a find a replacement candidate for.
-     * @param writebacks List for any writebacks to be performed.
      * @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