gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::branch_prediction::BPredUnit::PredictorHistory Struct Reference

Public Member Functions

 PredictorHistory (ThreadID _tid, InstSeqNum sn, Addr _pc, const StaticInstPtr &inst)
 Makes a predictor history struct that contains any information needed to update the predictor, BTB, and RAS.
 
 ~PredictorHistory ()
 
 PredictorHistory (const PredictorHistory &)=delete
 
PredictorHistoryoperator= (const PredictorHistory &)=delete
 
bool operator== (const PredictorHistory &entry) const
 

Public Attributes

const InstSeqNum seqNum
 The sequence number for the predictor history entry.
 
const ThreadID tid
 The thread id.
 
const Addr pc
 The PC associated with the sequence number.
 
const StaticInstPtr inst
 The branch instrction.
 
const BranchType type
 The type of the branch.
 
const bool call
 Whether or not the instruction was a call.
 
const bool uncond
 Was unconditional control.
 
bool predTaken
 Whether or not it was predicted taken.
 
bool actuallyTaken
 To record the actual outcome of the branch.
 
bool condPred
 The prediction of the conditional predictor.
 
bool btbHit
 Was BTB hit at prediction time.
 
TargetProvider targetProvider
 Which component provided the target.
 
bool resteered
 Resteered.
 
bool mispredict
 The branch was corrected hence was mispredicted.
 
std::unique_ptr< PCStateBasetarget
 The predicted target.
 
void * bpHistory = nullptr
 Pointer to the history objects passed back from the branch predictor subcomponents.
 
void * indirectHistory = nullptr
 
void * rasHistory = nullptr
 

Detailed Description

Definition at line 248 of file bpred_unit.hh.

Constructor & Destructor Documentation

◆ PredictorHistory() [1/2]

gem5::branch_prediction::BPredUnit::PredictorHistory::PredictorHistory ( ThreadID _tid,
InstSeqNum sn,
Addr _pc,
const StaticInstPtr & inst )
inline

Makes a predictor history struct that contains any information needed to update the predictor, BTB, and RAS.

Definition at line 254 of file bpred_unit.hh.

◆ ~PredictorHistory()

gem5::branch_prediction::BPredUnit::PredictorHistory::~PredictorHistory ( )
inline

Definition at line 266 of file bpred_unit.hh.

References bpHistory, indirectHistory, and rasHistory.

◆ PredictorHistory() [2/2]

gem5::branch_prediction::BPredUnit::PredictorHistory::PredictorHistory ( const PredictorHistory & )
delete

Member Function Documentation

◆ operator=()

PredictorHistory & gem5::branch_prediction::BPredUnit::PredictorHistory::operator= ( const PredictorHistory & )
delete

◆ operator==()

bool gem5::branch_prediction::BPredUnit::PredictorHistory::operator== ( const PredictorHistory & entry) const
inline

Definition at line 277 of file bpred_unit.hh.

References seqNum.

Member Data Documentation

◆ actuallyTaken

bool gem5::branch_prediction::BPredUnit::PredictorHistory::actuallyTaken

◆ bpHistory

void* gem5::branch_prediction::BPredUnit::PredictorHistory::bpHistory = nullptr

Pointer to the history objects passed back from the branch predictor subcomponents.

It is used to update or restore state. Respectively for conditional, indirect and RAS.

Definition at line 333 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), gem5::branch_prediction::BPredUnit::squash(), gem5::branch_prediction::BPredUnit::squashHistory(), and ~PredictorHistory().

◆ btbHit

bool gem5::branch_prediction::BPredUnit::PredictorHistory::btbHit

Was BTB hit at prediction time.

Definition at line 313 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::predict(), and gem5::branch_prediction::BPredUnit::squash().

◆ call

const bool gem5::branch_prediction::BPredUnit::PredictorHistory::call

Whether or not the instruction was a call.

Definition at line 298 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::squash().

◆ condPred

bool gem5::branch_prediction::BPredUnit::PredictorHistory::condPred

The prediction of the conditional predictor.

Definition at line 310 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::predict(), and gem5::branch_prediction::BPredUnit::squash().

◆ indirectHistory

◆ inst

const StaticInstPtr gem5::branch_prediction::BPredUnit::PredictorHistory::inst

The branch instrction.

Definition at line 292 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), and gem5::branch_prediction::BPredUnit::squash().

◆ mispredict

bool gem5::branch_prediction::BPredUnit::PredictorHistory::mispredict

The branch was corrected hence was mispredicted.

Definition at line 322 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), and gem5::branch_prediction::BPredUnit::squash().

◆ pc

const Addr gem5::branch_prediction::BPredUnit::PredictorHistory::pc

◆ predTaken

bool gem5::branch_prediction::BPredUnit::PredictorHistory::predTaken

Whether or not it was predicted taken.

Definition at line 304 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), and gem5::branch_prediction::BPredUnit::predict().

◆ rasHistory

◆ resteered

bool gem5::branch_prediction::BPredUnit::PredictorHistory::resteered

Resteered.

Definition at line 319 of file bpred_unit.hh.

◆ seqNum

const InstSeqNum gem5::branch_prediction::BPredUnit::PredictorHistory::seqNum

◆ target

std::unique_ptr<PCStateBase> gem5::branch_prediction::BPredUnit::PredictorHistory::target

◆ targetProvider

TargetProvider gem5::branch_prediction::BPredUnit::PredictorHistory::targetProvider

Which component provided the target.

Definition at line 316 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::predict(), and gem5::branch_prediction::BPredUnit::squash().

◆ tid

const ThreadID gem5::branch_prediction::BPredUnit::PredictorHistory::tid

The thread id.

Definition at line 286 of file bpred_unit.hh.

◆ type

const BranchType gem5::branch_prediction::BPredUnit::PredictorHistory::type

◆ uncond

const bool gem5::branch_prediction::BPredUnit::PredictorHistory::uncond

Was unconditional control.

Definition at line 301 of file bpred_unit.hh.

Referenced by gem5::branch_prediction::BPredUnit::predict().


The documentation for this struct was generated from the following file:

Generated on Tue Jun 18 2024 16:24:18 for gem5 by doxygen 1.11.0