Permalink
Browse files

cpu: Remove incorrect branch predictor drain checks

The branch predictor unit incorrectly checked that the prediction
history was empty when the system is drained. This is an incorrect
assumption since the predictor isn't affected by a drain.
  • Loading branch information...
1 parent fc6f569 commit 303f7c45adfde44d321cc41a479c0faae48879f6 @andysan committed Feb 4, 2013
Showing with 0 additions and 14 deletions.
  1. +0 −2 src/cpu/o3/fetch_impl.hh
  2. +0 −3 src/cpu/pred/bpred_unit.hh
  3. +0 −9 src/cpu/pred/bpred_unit_impl.hh
View
@@ -436,8 +436,6 @@ DefaultFetch<Impl>::drainSanityCheck() const
assert(!stalls[i].commit);
assert(fetchStatus[i] == Idle || stalls[i].drain);
}
-
- branchPred->drainSanityCheck();
}
template <class Impl>
@@ -76,9 +76,6 @@ class BPredUnit : public SimObject
*/
void regStats();
- /** Perform sanity checks after a drain. */
- void drainSanityCheck() const;
-
/**
* Predicts whether or not the instruction is a taken branch, and the
* target of the branch if it is taken.
@@ -118,15 +118,6 @@ BPredUnit::regStats()
;
}
-void
-BPredUnit::drainSanityCheck() const
-{
- // We shouldn't have any outstanding requests when we resume from
- // a drained system.
- for (int i = 0; i < numThreads; ++i)
- assert(predHist[i].empty());
-}
-
bool
BPredUnit::predict(StaticInstPtr &inst, const InstSeqNum &seqNum,
TheISA::PCState &pc, ThreadID tid)

0 comments on commit 303f7c4

Please sign in to comment.