mem-cache: Fix RepeatedQwords compressor
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Tue, 16 Jun 2020 15:15:32 +0000 (17:15 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 31 Aug 2020 17:45:43 +0000 (17:45 +0000)
This compressor does not allocate dictionary entries when there
is a match. This was causing the compressor to always fail.

Change-Id: I50eb56fa284854f3ee87f33af2c6e0a5c5248d7c
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33375
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/compressors/dictionary_compressor.hh
src/mem/cache/compressors/repeated_qwords.hh

index 650edab5a07e6d9c18eb073bbaa1507be5b1e009..b9c68a1d65e786a36462786e80788a5e67402458 100644 (file)
@@ -563,9 +563,10 @@ class DictionaryCompressor<T>::LocatedMaskedPattern
         const uint64_t code,
         const uint64_t metadata_length,
         const int match_location,
-        const DictionaryEntry bytes)
+        const DictionaryEntry bytes,
+        const bool allocate = true)
       : MaskedPattern<mask>(number, code, metadata_length, match_location,
-            bytes)
+            bytes, allocate)
     {
     }
 
index c361900c92b24b343624af71fa0dc9c2b0b29382..9a2df3caa2a1e2f79987f2ca7c8a2b9316d8c13a 100644 (file)
@@ -116,7 +116,7 @@ class RepeatedQwords::PatternM
   public:
     PatternM(const DictionaryEntry bytes, const int match_location)
         : LocatedMaskedPattern<0xFFFFFFFFFFFFFFFF, 0>(M, 1, 0, match_location,
-          bytes)
+          bytes, false)
     {
     }
 };