From 79e83c7d95985732979d48ace2f85caa33d7b5f5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Mon, 31 Aug 2020 22:29:57 +0200 Subject: [PATCH] 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 --- src/mem/cache/compressors/base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2