Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/12765
Change subject: mem-cache: Remove findBlockBySetAndWay
......................................................................
mem-cache: Remove findBlockBySetAndWay
Remove findBlockBySetAndWay from the tags classes, as they
imply the existence of sets and ways, which are placement
policy concepts.
Change-Id: I51a95fb9479b8ae12c86d1579a0d82ce43e07d07
---
M src/mem/cache/tags/base.hh
M src/mem/cache/tags/base_set_assoc.cc
M src/mem/cache/tags/base_set_assoc.hh
M src/mem/cache/tags/fa_lru.cc
M src/mem/cache/tags/fa_lru.hh
M src/mem/cache/tags/sector_tags.cc
M src/mem/cache/tags/sector_tags.hh
7 files changed, 0 insertions(+), 55 deletions(-)
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index b2c0adb..4f7b4ff 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -220,15 +220,6 @@
virtual CacheBlk *findBlock(Addr addr, bool is_secure) const;
/**
- * Find a block given set and way.
- *
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The block.
- */
- virtual ReplaceableEntry* findBlockBySetAndWay(int set, int way) const
= 0;
-
- /**
* Align an address to the block size.
* @param addr the address to align.
* @return The block address.
diff --git a/src/mem/cache/tags/base_set_assoc.cc
b/src/mem/cache/tags/base_set_assoc.cc
index 0d74eb9..a7b8638 100644
--- a/src/mem/cache/tags/base_set_assoc.cc
+++ b/src/mem/cache/tags/base_set_assoc.cc
@@ -125,12 +125,6 @@
replacementPolicy->invalidate(blk->replacementData);
}
-ReplaceableEntry*
-BaseSetAssoc::findBlockBySetAndWay(int set, int way) const
-{
- return sets[set][way];
-}
-
Addr
BaseSetAssoc::getSetFromIndex(const Addr index) const
{
diff --git a/src/mem/cache/tags/base_set_assoc.hh
b/src/mem/cache/tags/base_set_assoc.hh
index 886c735..2973c70 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -186,15 +186,6 @@
}
/**
- * Find a block given set and way.
- *
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The block.
- */
- ReplaceableEntry* findBlockBySetAndWay(int set, int way) const
override;
-
- /**
* Find replacement victim based on address. The list of evicted blocks
* only contains the victim.
*
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 3739994..2bf3a70 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -201,13 +201,6 @@
return blk;
}
-ReplaceableEntry*
-FALRU::findBlockBySetAndWay(int set, int way) const
-{
- assert(set == 0);
- return &blks[way];
-}
-
CacheBlk*
FALRU::findVictim(Addr addr, const bool is_secure,
std::vector<CacheBlk*>& evict_blks) const
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 55fc3eb..2827d99 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -207,15 +207,6 @@
CacheBlk* findBlock(Addr addr, bool is_secure) const override;
/**
- * Find a block given set and way.
- *
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The block.
- */
- ReplaceableEntry* findBlockBySetAndWay(int set, int way) const
override;
-
- /**
* Find replacement victim based on address. The list of evicted blocks
* only contains the victim.
*
diff --git a/src/mem/cache/tags/sector_tags.cc
b/src/mem/cache/tags/sector_tags.cc
index 6a47db7..a0c4f1d 100644
--- a/src/mem/cache/tags/sector_tags.cc
+++ b/src/mem/cache/tags/sector_tags.cc
@@ -260,12 +260,6 @@
return nullptr;
}
-ReplaceableEntry*
-SectorTags::findBlockBySetAndWay(int set, int way) const
-{
- return sets[set][way];
-}
-
CacheBlk*
SectorTags::findVictim(Addr addr, const bool is_secure,
std::vector<CacheBlk*>& evict_blks) const
diff --git a/src/mem/cache/tags/sector_tags.hh
b/src/mem/cache/tags/sector_tags.hh
index 6f34db3..b8295f5 100644
--- a/src/mem/cache/tags/sector_tags.hh
+++ b/src/mem/cache/tags/sector_tags.hh
@@ -178,15 +178,6 @@
CacheBlk* findBlock(Addr addr, bool is_secure) const override;
/**
- * Find a sector block given set and way.
- *
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The block.
- */
- ReplaceableEntry* findBlockBySetAndWay(int set, int way) const
override;
-
- /**
* Find replacement victim based on address.
*
* @param addr Address to find a victim for.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12765
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I51a95fb9479b8ae12c86d1579a0d82ce43e07d07
Gerrit-Change-Number: 12765
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev