mem-cache: Fix MRU rebase
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Fri, 23 Mar 2018 10:51:45 +0000 (11:51 +0100)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Fri, 23 Mar 2018 10:53:42 +0000 (10:53 +0000)
Rebase of MRU missed a const qualifier, introducing a compilation
error.

Change-Id: Ia25aa30523613a1a87593a353abe439946656f63
Reviewed-on: https://gem5-review.googlesource.com/9301
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/cache/replacement_policies/mru_rp.cc
src/mem/cache/replacement_policies/mru_rp.hh

index 0a89d4373ac43c12376842fab87d7abdb46f77ce..f4cf014ae20ebaefb15c451ac137d8a83dcf153d 100644 (file)
@@ -56,7 +56,7 @@ MRURP::reset(CacheBlk *blk)
 }
 
 CacheBlk*
-MRURP::getVictim(ReplacementCandidates& candidates)
+MRURP::getVictim(const ReplacementCandidates& candidates)
 {
     // There must be at least one replacement candidate
     assert(candidates.size() > 0);
index d9276e6894aca2c077e798e4cf25dc9e9b133cc5..d947d7cb39376266afc0fd54d305982aca8b567c 100644 (file)
@@ -77,7 +77,7 @@ class MRURP : public BaseReplacementPolicy
      * @param cands Replacement candidates, selected by indexing policy.
      * @return Cache block to be replaced.
      */
-    CacheBlk* getVictim(ReplacementCandidates& candidates) override;
+    CacheBlk* getVictim(const ReplacementCandidates& candidates) override;
 };
 
 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__