diff options
author | Dibakar Gope <gope@wisc.edu> | 2015-04-13 17:33:57 -0500 |
---|---|---|
committer | Dibakar Gope <gope@wisc.edu> | 2015-04-13 17:33:57 -0500 |
commit | 34ad1123ee5927e3b1503f07649620a533d3eab9 (patch) | |
tree | e655941704abbbafad01966bfa188449a336aaef /src/cpu/pred/tournament.cc | |
parent | e596e524985cfb1f4d46aceebe69bb7fcd94cf04 (diff) | |
download | gem5-34ad1123ee5927e3b1503f07649620a533d3eab9.tar.xz |
cpu: re-organizes the branch predictor structure.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/cpu/pred/tournament.cc')
-rw-r--r-- | src/cpu/pred/tournament.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cpu/pred/tournament.cc b/src/cpu/pred/tournament.cc index c6514b6ad..1d4fe037e 100644 --- a/src/cpu/pred/tournament.cc +++ b/src/cpu/pred/tournament.cc @@ -44,7 +44,7 @@ #include "base/intmath.hh" #include "cpu/pred/tournament.hh" -TournamentBP::TournamentBP(const Params *params) +TournamentBP::TournamentBP(const TournamentBPParams *params) : BPredUnit(params), localPredictorSize(params->localPredictorSize), localCtrBits(params->localCtrBits), @@ -58,8 +58,7 @@ TournamentBP::TournamentBP(const Params *params) ceilLog2(params->globalPredictorSize) : ceilLog2(params->choicePredictorSize)), choicePredictorSize(params->choicePredictorSize), - choiceCtrBits(params->choiceCtrBits), - instShiftAmt(params->instShiftAmt) + choiceCtrBits(params->choiceCtrBits) { if (!isPowerOf2(localPredictorSize)) { fatal("Invalid local predictor size!\n"); @@ -249,7 +248,7 @@ TournamentBP::lookup(Addr branch_addr, void * &bp_history) } void -TournamentBP::uncondBranch(void * &bp_history) +TournamentBP::uncondBranch(Addr pc, void * &bp_history) { // Create BPHistory and pass it back to be recorded. BPHistory *history = new BPHistory; @@ -376,6 +375,12 @@ TournamentBP::squash(void *bp_history) delete history; } +TournamentBP* +TournamentBPParams::create() +{ + return new TournamentBP(this); +} + #ifdef DEBUG int TournamentBP::BPHistory::newCount = 0; |