|
gem5 v25.0.0.1
|
Branch Predictor Unit (BPU) history object PredictorHistory This class holds all information needed to manage the speculative state of a in-flight branch prediction. More...
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 | |
| PredictorHistory & | operator= (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< PCStateBase > | target |
| The predicted target. | |
| void * | bpHistory = nullptr |
| Pointer to the history objects passed back from the branch predictor subcomponents. | |
| void * | indirectHistory = nullptr |
| void * | rasHistory = nullptr |
Branch Predictor Unit (BPU) history object PredictorHistory This class holds all information needed to manage the speculative state of a in-flight branch prediction.
In case of the default (coupled/synchronous) front-end, the branch predictor is queried whenever the a branch is decoded by the fetch unit. In case of the decoupled front-end, the branch predictor is queried whenever a branch is detected using the BTB.
Lifetime of a PredictorHistory (coupled front-end):
-----------------------------------------—+ | COMMIT: | | - The branch is resolved and the correct | | branch direction and target is known. |
Definition at line 341 of file bpred_unit.hh.
|
inline |
Makes a predictor history struct that contains any information needed to update the predictor, BTB, and RAS.
Definition at line 347 of file bpred_unit.hh.
References actuallyTaken, bpHistory, btbHit, call, condPred, gem5::branch_prediction::getBranchType(), indirectHistory, inst, mispredict, pc, predTaken, rasHistory, resteered, seqNum, target, targetProvider, tid, type, and uncond.
Referenced by operator=(), operator==(), and PredictorHistory().
|
inline |
Definition at line 359 of file bpred_unit.hh.
References bpHistory, indirectHistory, and rasHistory.
|
delete |
References PredictorHistory().
|
delete |
References PredictorHistory().
|
inline |
Definition at line 370 of file bpred_unit.hh.
References PredictorHistory(), and seqNum.
| bool gem5::branch_prediction::BPredUnit::PredictorHistory::actuallyTaken |
To record the actual outcome of the branch.
Definition at line 400 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| 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 426 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), gem5::branch_prediction::BPredUnit::squash(), gem5::branch_prediction::BPredUnit::squashHistory(), and ~PredictorHistory().
| bool gem5::branch_prediction::BPredUnit::PredictorHistory::btbHit |
Was BTB hit at prediction time.
Definition at line 406 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| const bool gem5::branch_prediction::BPredUnit::PredictorHistory::call |
Whether or not the instruction was a call.
Definition at line 391 of file bpred_unit.hh.
Referenced by PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| bool gem5::branch_prediction::BPredUnit::PredictorHistory::condPred |
The prediction of the conditional predictor.
Definition at line 403 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| void* gem5::branch_prediction::BPredUnit::PredictorHistory::indirectHistory = nullptr |
Definition at line 428 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), gem5::branch_prediction::BPredUnit::squash(), gem5::branch_prediction::BPredUnit::squashHistory(), and ~PredictorHistory().
| const StaticInstPtr gem5::branch_prediction::BPredUnit::PredictorHistory::inst |
The branch instrction.
Definition at line 385 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| bool gem5::branch_prediction::BPredUnit::PredictorHistory::mispredict |
The branch was corrected hence was mispredicted.
Definition at line 415 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| const Addr gem5::branch_prediction::BPredUnit::PredictorHistory::pc |
The PC associated with the sequence number.
Definition at line 382 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), gem5::branch_prediction::BPredUnit::squash(), and gem5::branch_prediction::BPredUnit::squashHistory().
| bool gem5::branch_prediction::BPredUnit::PredictorHistory::predTaken |
Whether or not it was predicted taken.
Definition at line 397 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), and PredictorHistory().
| void* gem5::branch_prediction::BPredUnit::PredictorHistory::rasHistory = nullptr |
Definition at line 430 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), gem5::branch_prediction::BPredUnit::squash(), gem5::branch_prediction::BPredUnit::squashHistory(), and ~PredictorHistory().
| bool gem5::branch_prediction::BPredUnit::PredictorHistory::resteered |
| const InstSeqNum gem5::branch_prediction::BPredUnit::PredictorHistory::seqNum |
The sequence number for the predictor history entry.
Definition at line 376 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), operator==(), PredictorHistory(), gem5::branch_prediction::BPredUnit::squash(), and gem5::branch_prediction::BPredUnit::squashHistory().
| std::unique_ptr<PCStateBase> gem5::branch_prediction::BPredUnit::PredictorHistory::target |
The predicted target.
Definition at line 418 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| TargetProvider gem5::branch_prediction::BPredUnit::PredictorHistory::targetProvider |
Which component provided the target.
Definition at line 409 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::predict(), PredictorHistory(), and gem5::branch_prediction::BPredUnit::squash().
| const ThreadID gem5::branch_prediction::BPredUnit::PredictorHistory::tid |
| const BranchType gem5::branch_prediction::BPredUnit::PredictorHistory::type |
The type of the branch.
Definition at line 388 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::commitBranch(), PredictorHistory(), gem5::branch_prediction::BPredUnit::squash(), and gem5::branch_prediction::BPredUnit::squashHistory().
| const bool gem5::branch_prediction::BPredUnit::PredictorHistory::uncond |
Was unconditional control.
Definition at line 394 of file bpred_unit.hh.
Referenced by gem5::branch_prediction::BPredUnit::predict(), and PredictorHistory().