mem-cache: Allow prefetchers to override setCache.
authorXiaoyu Ma <xiaoyuma@google.com>
Wed, 17 Jan 2018 23:08:06 +0000 (15:08 -0800)
committerGabe Black <gabeblack@google.com>
Wed, 7 Mar 2018 00:13:39 +0000 (00:13 +0000)
This lets them hook setCache, perhaps to set up additional state based
on the set cache.

Change-Id: Ic3b34fa43d052c71e8ef733a57fe47c70899cd27
Reviewed-on: https://gem5-review.googlesource.com/8701
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/mem/cache/prefetch/base.hh

index 683c59f1f2a75f5ab986be959e46cfcb340665c6..3b2310621b65f10db47d1a38f37d8f70a65c7803 100644 (file)
@@ -125,7 +125,7 @@ class BasePrefetcher : public ClockedObject
 
     virtual ~BasePrefetcher() {}
 
-    void setCache(BaseCache *_cache);
+    virtual void setCache(BaseCache *_cache);
 
     /**
      * Notify prefetcher of cache access (may be any access or just