BPRED: Fixed the treshold-bug in the tournament predictor.

Suppose the saturating counters of a branch predictor contain n bits.  When the
counter is between 0 and (2^(n-1) - 1), boundaries included, the branch is
predicted as not taken.  When the counter is between 2^(n-1) and (2^n - 1),
boundaries included, the branch is predicted as taken.
This commit is contained in:
Maximilien Breughe 2010-05-13 23:45:57 -04:00
parent d984593855
commit fc746c2268

View file

@ -104,7 +104,6 @@ TournamentBP::TournamentBP(unsigned _localPredictorSize,
// @todo: Allow for different thresholds between the predictors.
threshold = (1 << (localCtrBits - 1)) - 1;
threshold = threshold / 2;
}
inline