gem5  v22.1.0.0
Public Member Functions | Public Attributes | List of all members
gem5::branch_prediction::BPredUnit::PredictorHistory Struct Reference

Public Member Functions

 PredictorHistory (const InstSeqNum &seq_num, Addr instPC, bool pred_taken, void *bp_history, void *indirect_history, ThreadID _tid, const StaticInstPtr &inst)
 Makes a predictor history struct that contains any information needed to update the predictor, BTB, and RAS. More...
 
 PredictorHistory (const PredictorHistory &other)
 
bool operator== (const PredictorHistory &entry) const
 

Public Attributes

InstSeqNum seqNum
 The sequence number for the predictor history entry. More...
 
Addr pc
 The PC associated with the sequence number. More...
 
void * bpHistory = nullptr
 Pointer to the history object passed back from the branch predictor. More...
 
void * indirectHistory = nullptr
 
std::unique_ptr< PCStateBaseRASTarget
 The RAS target (only valid if a return). More...
 
unsigned RASIndex = 0
 The RAS index of the instruction (only valid if a call). More...
 
ThreadID tid
 The thread id. More...
 
bool predTaken
 Whether or not it was predicted taken. More...
 
bool usedRAS = false
 Whether or not the RAS was used. More...
 
bool pushedRAS = false
 
bool wasCall = false
 Whether or not the instruction was a call. More...
 
bool wasReturn = false
 Whether or not the instruction was a return. More...
 
bool wasIndirect = false
 Wether this instruction was an indirect branch. More...
 
Addr target = MaxAddr
 Target of the branch. More...
 
const StaticInstPtr inst
 The branch instrction. More...
 

Detailed Description

Definition at line 202 of file bpred_unit.hh.

Constructor & Destructor Documentation

◆ PredictorHistory() [1/2]

gem5::branch_prediction::BPredUnit::PredictorHistory::PredictorHistory ( const InstSeqNum seq_num,
Addr  instPC,
bool  pred_taken,
void *  bp_history,
void *  indirect_history,
ThreadID  _tid,
const StaticInstPtr inst 
)
inline

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

Definition at line 208 of file bpred_unit.hh.

◆ PredictorHistory() [2/2]

gem5::branch_prediction::BPredUnit::PredictorHistory::PredictorHistory ( const PredictorHistory other)
inline

Definition at line 217 of file bpred_unit.hh.

References RASTarget, and gem5::ArmISA::set.

Member Function Documentation

◆ operator==()

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

Definition at line 229 of file bpred_unit.hh.

References seqNum.

Member Data Documentation

◆ bpHistory

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

Pointer to the history object passed back from the branch predictor.

It is used to update or restore state of the branch predictor.

Definition at line 244 of file bpred_unit.hh.

◆ indirectHistory

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

Definition at line 246 of file bpred_unit.hh.

◆ inst

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

The branch instrction.

Definition at line 281 of file bpred_unit.hh.

◆ pc

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

The PC associated with the sequence number.

Definition at line 238 of file bpred_unit.hh.

◆ predTaken

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

Whether or not it was predicted taken.

Definition at line 258 of file bpred_unit.hh.

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

◆ pushedRAS

bool gem5::branch_prediction::BPredUnit::PredictorHistory::pushedRAS = false

Definition at line 264 of file bpred_unit.hh.

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

◆ RASIndex

unsigned gem5::branch_prediction::BPredUnit::PredictorHistory::RASIndex = 0

The RAS index of the instruction (only valid if a call).

Definition at line 252 of file bpred_unit.hh.

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

◆ RASTarget

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

The RAS target (only valid if a return).

Definition at line 249 of file bpred_unit.hh.

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

◆ seqNum

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

The sequence number for the predictor history entry.

Definition at line 235 of file bpred_unit.hh.

Referenced by operator==().

◆ target

Addr gem5::branch_prediction::BPredUnit::PredictorHistory::target = MaxAddr

Target of the branch.

First it is predicted, and fixed later if necessary

Definition at line 278 of file bpred_unit.hh.

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

◆ tid

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

The thread id.

Definition at line 255 of file bpred_unit.hh.

◆ usedRAS

bool gem5::branch_prediction::BPredUnit::PredictorHistory::usedRAS = false

Whether or not the RAS was used.

Definition at line 261 of file bpred_unit.hh.

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

◆ wasCall

bool gem5::branch_prediction::BPredUnit::PredictorHistory::wasCall = false

Whether or not the instruction was a call.

Definition at line 267 of file bpred_unit.hh.

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

◆ wasIndirect

bool gem5::branch_prediction::BPredUnit::PredictorHistory::wasIndirect = false

Wether this instruction was an indirect branch.

Definition at line 273 of file bpred_unit.hh.

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

◆ wasReturn

bool gem5::branch_prediction::BPredUnit::PredictorHistory::wasReturn = false

Whether or not the instruction was a return.

Definition at line 270 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 Wed Dec 21 2022 10:23:37 for gem5 by doxygen 1.9.1