summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/fa_lru.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/tags/fa_lru.hh')
-rw-r--r--src/mem/cache/tags/fa_lru.hh22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 35413c253..876219b00 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -111,19 +111,19 @@ class FALRU : public BaseTags
FALRUBlk *tail;
/** Hash table type mapping addresses to cache block pointers. */
- typedef std::unordered_map<Addr, FALRUBlk *, std::hash<Addr> > hash_t;
- /** Iterator into the address hash table. */
- typedef hash_t::const_iterator tagIterator;
+ struct PairHash
+ {
+ template <class T1, class T2>
+ std::size_t operator()(const std::pair<T1, T2> &p) const
+ {
+ return std::hash<T1>()(p.first) ^ std::hash<T2>()(p.second);
+ }
+ };
+ typedef std::pair<Addr, bool> TagHashKey;
+ typedef std::unordered_map<TagHashKey, FALRUBlk *, PairHash> TagHash;
/** The address hash table. */
- hash_t tagHash;
-
- /**
- * Find the cache block for the given address.
- * @param addr The address to find.
- * @return The cache block of the address, if any.
- */
- FALRUBlk * hashLookup(Addr addr) const;
+ TagHash tagHash;
/**
* Move a cache block to the MRU position.