*/
BPredUnit(const Params *p);
- /**
- * Registers statistics.
- */
- void regStats() override;
-
void regProbePoints() override;
/** Perform sanity checks after a drain. */
*/
virtual void update(ThreadID tid, Addr instPC, bool taken,
void *bp_history, bool squashed,
- const StaticInstPtr & inst = StaticInst::nullStaticInstPtr,
- Addr corrTarget = MaxAddr) = 0;
+ const StaticInstPtr &inst, Addr corrTarget) = 0;
/**
* Updates the BTB with the target of a branch.
* @param inst_PC The branch's PC that will be updated.
/** The indirect target predictor. */
IndirectPredictor * iPred;
- /** Stat for number of BP lookups. */
- Stats::Scalar lookups;
- /** Stat for number of conditional branches predicted. */
- Stats::Scalar condPredicted;
- /** Stat for number of conditional branches predicted incorrectly. */
- Stats::Scalar condIncorrect;
- /** Stat for number of BTB lookups. */
- Stats::Scalar BTBLookups;
- /** Stat for number of BTB hits. */
- Stats::Scalar BTBHits;
- /** Stat for number of times the BTB is correct. */
- Stats::Scalar BTBCorrect;
- /** Stat for percent times an entry in BTB found. */
- Stats::Formula BTBHitPct;
- /** Stat for number of times the RAS is used to get a target. */
- Stats::Scalar usedRAS;
- /** Stat for number of times the RAS is incorrect. */
- Stats::Scalar RASIncorrect;
-
- /** Stat for the number of indirect target lookups.*/
- Stats::Scalar indirectLookups;
- /** Stat for the number of indirect target hits.*/
- Stats::Scalar indirectHits;
- /** Stat for the number of indirect target misses.*/
- Stats::Scalar indirectMisses;
- /** Stat for the number of indirect target mispredictions.*/
- Stats::Scalar indirectMispredicted;
+ struct BPredUnitStats : public Stats::Group {
+ BPredUnitStats(Stats::Group *parent);
+
+ /** Stat for number of BP lookups. */
+ Stats::Scalar lookups;
+ /** Stat for number of conditional branches predicted. */
+ Stats::Scalar condPredicted;
+ /** Stat for number of conditional branches predicted incorrectly. */
+ Stats::Scalar condIncorrect;
+ /** Stat for number of BTB lookups. */
+ Stats::Scalar BTBLookups;
+ /** Stat for number of BTB hits. */
+ Stats::Scalar BTBHits;
+ /** Stat for percent times an entry in BTB found. */
+ Stats::Formula BTBHitPct;
+ /** Stat for number of times the RAS is used to get a target. */
+ Stats::Scalar RASUsed;
+ /** Stat for number of times the RAS is incorrect. */
+ Stats::Scalar RASIncorrect;
+
+ /** Stat for the number of indirect target lookups.*/
+ Stats::Scalar indirectLookups;
+ /** Stat for the number of indirect target hits.*/
+ Stats::Scalar indirectHits;
+ /** Stat for the number of indirect target misses.*/
+ Stats::Scalar indirectMisses;
+ /** Stat for the number of indirect target mispredictions.*/
+ Stats::Scalar indirectMispredicted;
+ } stats;
protected:
/** Number of bits to shift instructions by for predictor addresses. */