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>
This commit is contained in:
Gabe Black
2018-11-02 16:48:10 -07:00
parent adde4c91f9
commit 66217480be
8 changed files with 8 additions and 8 deletions

View File

@@ -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);
}

View File

@@ -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.

View File

@@ -63,7 +63,7 @@ BaseSetAssoc::BaseSetAssoc(const Params *p)
}
void
BaseSetAssoc::init(BaseCache* cache)
BaseSetAssoc::tagsInit(BaseCache* cache)
{
// Set parent cache
setCache(cache);

View File

@@ -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

View File

@@ -84,7 +84,7 @@ FALRU::~FALRU()
}
void
FALRU::init(BaseCache* cache)
FALRU::tagsInit(BaseCache* cache)
{
// Set parent cache
setCache(cache);

View File

@@ -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.

View File

@@ -64,7 +64,7 @@ SectorTags::SectorTags(const SectorTagsParams *p)
}
void
SectorTags::init(BaseCache* cache)
SectorTags::tagsInit(BaseCache* cache)
{
// Set parent cache
setCache(cache);

View File

@@ -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