mem-cache: Fixes to PIF prefetcher
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Fri, 1 May 2020 15:15:42 +0000 (17:15 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 4 May 2020 10:29:03 +0000 (10:29 +0000)
commitc764e1b3dcadf4dea48db4831e67f360d46988dd
tree9814b9ec1efaece6fe32eb8131a56d066824191d
parentdcd5ca640273a80e0e1a49397060a3e92c4e224d
mem-cache: Fixes to PIF prefetcher

The temporal compactor was never initialized.

There were more possible indexes to the prec/succ vectors than
entries, so a block distance of zero would seg fault.

When checking for an address the wrong vector was being used.

From the original paper, "The prediction mechanism searches for
the PC of the accessed instruction in the index table"

Change-Id: I3c3aceac3c0adbbe8aef5c634c88cb35ba7487be
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28487
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/prefetch/pif.cc