53d52
< #include <memory>
55a55
> #include "debug/CacheRepl.hh"
57a58
> #include "mem/cache/replacement_policies/base.hh"
108d108
<
122a123,130
> * This function updates the tags when a block is invalidated but does
> * not invalidate the block itself. It also updates the replacement data.
> *
> * @param blk The block to invalidate.
> */
> void invalidate(CacheBlk *blk) override;
>
> /**
167a176,178
> // Update number of references to accessed block
> blk->refCount++;
>
169c180
< replacementPolicy->touch(blk);
---
> replacementPolicy->touch(blk->replacementData);
195a207,209
> // Get possible locations for the victim block
> std::vector<CacheBlk*> locations = getPossibleLocations(addr);
>
197c211,218
< return replacementPolicy->getVictim(getPossibleLocations(addr));
---
> CacheBlk* victim = static_cast<CacheBlk*>(replacementPolicy->getVictim(
> std::vector<ReplaceableEntry*>(
> locations.begin(), locations.end())));
>
> DPRINTF(CacheRepl, "set %x, way %x: selecting blk for replacement\n",
> victim->set, victim->way);
>
> return victim;
226c247
< replacementPolicy->reset(blk);
---
> replacementPolicy->reset(blk->replacementData);