From: Daniel R. Carvalho Date: Mon, 31 Aug 2020 20:29:57 +0000 (+0200) Subject: mem-cache: Fix copy ellision on base compressor X-Git-Tag: v20.1.0.0~173 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79e83c7d95985732979d48ace2f85caa33d7b5f5;p=gem5.git mem-cache: Fix copy ellision on base compressor Newer compiler versions have a problem with this move as it prevents copy elision. Change-Id: I802703df12e171d6a377b673d0ad7e202456b516 Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33835 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/mem/cache/compressors/base.cc b/src/mem/cache/compressors/base.cc index e12e36e18..1408d2dda 100644 --- a/src/mem/cache/compressors/base.cc +++ b/src/mem/cache/compressors/base.cc @@ -165,7 +165,7 @@ Base::compress(const uint64_t* data, Cycles& comp_lat, Cycles& decomp_lat) "Compression latency: %llu, decompression latency: %llu\n", blkSize*8, comp_size_bits, comp_lat, decomp_lat); - return std::move(comp_data); + return comp_data; } Cycles