mem-cache: Fix copy ellision on base compressor
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Mon, 31 Aug 2020 20:29:57 +0000 (22:29 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Tue, 1 Sep 2020 06:29:10 +0000 (06:29 +0000)
Newer compiler versions have a problem with this move as
it prevents copy elision.

Change-Id: I802703df12e171d6a377b673d0ad7e202456b516
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33835
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/compressors/base.cc

index e12e36e182d641b0925a6bc6122605b07daafcb4..1408d2ddac917251d2b2e516fb55acc67974e2f2 100644 (file)
@@ -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