Go to the documentation of this file.
44 #include "debug/Fetch.hh"
45 #include "debug/Tage.hh"
69 if (
bi->tageBranchInfo->condBranch) {
70 DPRINTF(Tage,
"Updating tables for branch:%lx; taken?:%d\n",
74 corrTarget,
bi->tageBranchInfo->tagePred);
87 DPRINTF(Tage,
"Deleting branch info: %lx\n",
bi->tageBranchInfo->branchPC);
102 bool retval =
predict(tid, branch_pc,
true, bp_history);
106 DPRINTF(Tage,
"Lookup branch: %lx; predict:%d\n", branch_pc, retval);
123 DPRINTF(Tage,
"UnConditionalBranch: %lx\n", br_pc);
124 predict(tid, br_pc,
false, bp_history);
132 return new TAGE(
this);
void btbUpdate(ThreadID tid, Addr branch_addr, void *&bp_history) override
If a branch is not taken, because the BTB address is invalid or missing, this function sets the appro...
virtual void squash(ThreadID tid, void *bp_history) override
TAGE(const TAGEParams *params)
int16_t ThreadID
Thread index/ID type.
void update(ThreadID tid, Addr branch_addr, bool taken, void *bp_history, bool squashed, const StaticInstPtr &inst, Addr corrTarget) override
Updates the BP with taken/not taken information.
virtual void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *bi, int nrand, Addr corrTarget, bool pred, bool preAdjustAlloc=false)
Update TAGE for conditional branches.
void uncondBranch(ThreadID tid, Addr br_pc, void *&bp_history) override
Basically a wrapper class to hold both the branch predictor and the BTB.
virtual void updateHistories(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *b, bool speculative, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr, Addr target=MaxAddr)
(Speculatively) updates global histories (path and direction).
bool lookup(ThreadID tid, Addr branch_addr, void *&bp_history) override
Looks up a given PC in the BP to see if it is taken or not taken.
virtual void updateStats(bool taken, BranchInfo *bi)
Update the stats.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual void squash(ThreadID tid, bool taken, BranchInfo *bi, Addr target)
Restores speculatively updated path and direction histories.
void btbUpdate(ThreadID tid, Addr branch_addr, BranchInfo *&bi)
bool tagePredict(ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo *bi)
TAGE prediction called from TAGE::predict.
std::enable_if< std::is_integral< T >::value, T >::type random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
virtual bool predict(ThreadID tid, Addr branch_pc, bool cond_branch, void *&b)
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17