changeset c2e1ead33662 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=c2e1ead33662
description:
        cpu: correct comments in tournament branch predictor

        The tournament predictor is presented as doing speculative
        update of the global history and non-speculative update
        of the local history used to generate the branch prediction.
        However, the code does speculative update of both histories.

        Signed-off-by: Jason Lowe-Power <[email protected]>

diffstat:

 src/cpu/pred/tournament.cc |  4 ++--
 src/cpu/pred/tournament.hh |  5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 1ae84c76066b -r c2e1ead33662 src/cpu/pred/tournament.cc
--- a/src/cpu/pred/tournament.cc        Wed Dec 21 15:05:24 2016 -0600
+++ b/src/cpu/pred/tournament.cc        Wed Dec 21 15:06:13 2016 -0600
@@ -222,8 +222,8 @@
 
     assert(local_history_idx < localHistoryTableSize);
 
-    // Commented code is for doing speculative update of counters and
-    // all histories.
+    // Speculative update of the global history and the
+    // selected local history.
     if (choice_prediction) {
         if (global_prediction) {
             updateGlobalHistTaken(tid);
diff -r 1ae84c76066b -r c2e1ead33662 src/cpu/pred/tournament.hh
--- a/src/cpu/pred/tournament.hh        Wed Dec 21 15:05:24 2016 -0600
+++ b/src/cpu/pred/tournament.hh        Wed Dec 21 15:06:13 2016 -0600
@@ -57,9 +57,8 @@
  * used in the 21264.  It has a local predictor, which uses a local history
  * table to index into a table of counters, and a global predictor, which
  * uses a global history to index into a table of counters.  A choice
- * predictor chooses between the two.  Only the global history register
- * is speculatively updated, the rest are updated upon branches committing
- * or misspeculating.
+ * predictor chooses between the two.  Both the global history register
+ * and the selected local history are speculatively updated.
  */
 class TournamentBP : public BPredUnit
 {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to