From: Gabe Black Date: Thu, 12 Nov 2020 07:01:48 +0000 (-0800) Subject: mem-cache: Remove "inline" from a method in one of the prefetchers. X-Git-Tag: develop-gem5-snapshot~475 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=760e18e35bef25d24d4543f71b9e3c4f5861d7c4;p=gem5.git mem-cache: Remove "inline" from a method in one of the prefetchers. The function was defined in a .cc file but marked as inline. gcc seems to often figure out what it should do, but in clang it doesn't export the function (since it's marked as inline), and during linking external references, which don't have a local copy since it's not defined in the .hh file, will fail. This failure looks particularly odd because the funciton is virtual, and so the failure is reported as being unable to compose the vtable in places where the object is constructed, relatively obscure code which is generated by the build system and obscured by templates from an external code base (pybind11). Change-Id: Ib51aefbf9005e4ca8dfebef32c5def472175f115 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37436 Reviewed-by: Nikos Nikoleris Reviewed-by: Daniel Carvalho Reviewed-by: Bobby R. Bruce Maintainer: Nikos Nikoleris Tested-by: kokoro --- diff --git a/src/mem/cache/prefetch/stride.cc b/src/mem/cache/prefetch/stride.cc index 0020371c6..11ecd16c4 100644 --- a/src/mem/cache/prefetch/stride.cc +++ b/src/mem/cache/prefetch/stride.cc @@ -187,7 +187,7 @@ Stride::calculatePrefetch(const PrefetchInfo &pfi, } } -inline uint32_t +uint32_t StridePrefetcherHashedSetAssociative::extractSet(const Addr pc) const { const Addr hash1 = pc >> 1;