summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-11-02 16:48:10 -0700
committerGabe Black <gabeblack@google.com>2018-11-05 23:07:46 +0000
commit66217480be4033a7979997f469128b01048493b7 (patch)
tree31ec9cb340e75bd813fb56e8483ffb98115a3222
parentadde4c91f99fa99abbdd23cf97c45de020429d2d (diff)
downloadgem5-66217480be4033a7979997f469128b01048493b7.tar.xz
mem-cache: Rename the tag class init function to tagsInit.
Since the tag classes are subclasses of SimObject, they inherit an init function which does generic initialization at simulation startup and which doesn't take any parameters. A new function was added which does take a parameter, and which is just for doing tag specific initialization as triggered by the base cache. These two names clashed, and clang complained that the tag local name was hiding the SimObject name (which it was). Change-Id: I399775aceaf8f1a8e2646d434facef22e6d3e7d0 Reviewed-on: https://gem5-review.googlesource.com/c/13875 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
-rw-r--r--src/mem/cache/base.cc2
-rw-r--r--src/mem/cache/tags/base.hh2
-rw-r--r--src/mem/cache/tags/base_set_assoc.cc2
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh2
-rw-r--r--src/mem/cache/tags/fa_lru.cc2
-rw-r--r--src/mem/cache/tags/fa_lru.hh2
-rw-r--r--src/mem/cache/tags/sector_tags.cc2
-rw-r--r--src/mem/cache/tags/sector_tags.hh2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index a7c210697..8f7a8922d 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -118,7 +118,7 @@ BaseCache::BaseCache(const BaseCacheParams *p, unsigned blk_size)
tempBlock = new TempCacheBlk(blkSize);
- tags->init(this);
+ tags->tagsInit(this);
if (prefetcher)
prefetcher->setCache(this);
}
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index 257b1bd29..a7a35ffbb 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -179,7 +179,7 @@ class BaseTags : public ClockedObject
*
* @param _cache Pointer to parent cache.
*/
- virtual void init(BaseCache *_cache) = 0;
+ virtual void tagsInit(BaseCache *_cache) = 0;
/**
* Register local statistics.
diff --git a/src/mem/cache/tags/base_set_assoc.cc b/src/mem/cache/tags/base_set_assoc.cc
index 74fb247a6..b3b773106 100644
--- a/src/mem/cache/tags/base_set_assoc.cc
+++ b/src/mem/cache/tags/base_set_assoc.cc
@@ -63,7 +63,7 @@ BaseSetAssoc::BaseSetAssoc(const Params *p)
}
void
-BaseSetAssoc::init(BaseCache* cache)
+BaseSetAssoc::tagsInit(BaseCache* cache)
{
// Set parent cache
setCache(cache);
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 70e907119..58aceb087 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -103,7 +103,7 @@ class BaseSetAssoc : public BaseTags
*
* @param _cache Pointer to parent cache.
*/
- void init(BaseCache *_cache) override;
+ void tagsInit(BaseCache *_cache) override;
/**
* This function updates the tags when a block is invalidated. It also
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 01f0aa256..2c92a940f 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -84,7 +84,7 @@ FALRU::~FALRU()
}
void
-FALRU::init(BaseCache* cache)
+FALRU::tagsInit(BaseCache* cache)
{
// Set parent cache
setCache(cache);
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 15043995f..6ea4c8d6a 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -163,7 +163,7 @@ class FALRU : public BaseTags
*
* @param _cache Pointer to parent cache.
*/
- void init(BaseCache *_cache) override;
+ void tagsInit(BaseCache *_cache) override;
/**
* Register the stats for this object.
diff --git a/src/mem/cache/tags/sector_tags.cc b/src/mem/cache/tags/sector_tags.cc
index 8c87074ec..24751c97d 100644
--- a/src/mem/cache/tags/sector_tags.cc
+++ b/src/mem/cache/tags/sector_tags.cc
@@ -64,7 +64,7 @@ SectorTags::SectorTags(const SectorTagsParams *p)
}
void
-SectorTags::init(BaseCache* cache)
+SectorTags::tagsInit(BaseCache* cache)
{
// Set parent cache
setCache(cache);
diff --git a/src/mem/cache/tags/sector_tags.hh b/src/mem/cache/tags/sector_tags.hh
index 40df7829d..1149ba1e0 100644
--- a/src/mem/cache/tags/sector_tags.hh
+++ b/src/mem/cache/tags/sector_tags.hh
@@ -105,7 +105,7 @@ class SectorTags : public BaseTags
*
* @param _cache Pointer to parent cache.
*/
- void init(BaseCache *_cache) override;
+ void tagsInit(BaseCache *_cache) override;
/**
* This function updates the tags when a block is invalidated but does