summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/bpred_unit.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:33 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:33 -0400
commite2f9266dbfc7ef54f94028eeffa4e40c76ffc17a (patch)
treed97a7706131a6b59fee4727386c21dea51f9d07f /src/cpu/inorder/resources/bpred_unit.cc
parent6df63650956387d88f24122c783438553412768f (diff)
downloadgem5-e2f9266dbfc7ef54f94028eeffa4e40c76ffc17a.tar.xz
inorder: update bpred code
clean up control flow to make it easier to understand
Diffstat (limited to 'src/cpu/inorder/resources/bpred_unit.cc')
-rw-r--r--src/cpu/inorder/resources/bpred_unit.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/cpu/inorder/resources/bpred_unit.cc b/src/cpu/inorder/resources/bpred_unit.cc
index 127843e96..25b8b165a 100644
--- a/src/cpu/inorder/resources/bpred_unit.cc
+++ b/src/cpu/inorder/resources/bpred_unit.cc
@@ -1,3 +1,4 @@
+
/*
* Copyright (c) 2004-2005 The Regents of The University of Michigan
* All rights reserved.
@@ -189,10 +190,6 @@ BPredUnit::predict(DynInstPtr &inst, TheISA::PCState &predPC, ThreadID tid)
++condPredicted;
pred_taken = BPLookup(predPC.instAddr(), bp_history);
-
- DPRINTF(InOrderBPred, "[tid:%i]: Branch predictor predicted %i "
- "for PC %s\n",
- tid, pred_taken, inst->pcState());
}
PredictorHistory predict_record(inst->seqNum, predPC, pred_taken,
@@ -242,10 +239,6 @@ BPredUnit::predict(DynInstPtr &inst, TheISA::PCState &predPC, ThreadID tid)
inst->isUncondCtrl() &&
inst->isDirectCtrl()) {
target = inst->branchTarget();
-
- DPRINTF(InOrderBPred, "[tid:%i]: Setting %s predicted"
- " target to %s.\n",
- tid, inst->pcState(), target);
} else if (BTB.valid(predPC.instAddr(), asid)) {
++BTBHits;
@@ -267,6 +260,8 @@ BPredUnit::predict(DynInstPtr &inst, TheISA::PCState &predPC, ThreadID tid)
// Set the PC and the instruction's predicted target.
predPC = target;
}
+ DPRINTF(InOrderBPred, "[tid:%i]: [sn:%i]: Setting Predicted PC to %s.\n",
+ tid, inst->seqNum, predPC);
predHist[tid].push_front(predict_record);