File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed
Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -97,13 +97,14 @@ def setKmhV3Params(args, system):
9797
9898 cpu .branchPred .mbtb .resolvedUpdate = True
9999 cpu .branchPred .tage .resolvedUpdate = True
100+ cpu .branchPred .ittage .resolvedUpdate = True
100101
101102 cpu .branchPred .ubtb .enabled = True
102103 cpu .branchPred .abtb .enabled = True
103104 cpu .branchPred .microtage .enabled = False
104105 cpu .branchPred .mbtb .enabled = True
105106 cpu .branchPred .tage .enabled = True
106- cpu .branchPred .ittage .enabled = False
107+ cpu .branchPred .ittage .enabled = True
107108 cpu .branchPred .mgsc .enabled = False
108109 cpu .branchPred .ras .enabled = False
109110
Original file line number Diff line number Diff line change @@ -219,10 +219,17 @@ BTBITTAGE::update(const FetchStream &stream)
219219 all_entries_to_update.push_back (stream.updateNewBTBEntry );
220220 }
221221
222- // only update indirect branches that are not returns
223- auto remove_it = std::remove_if (all_entries_to_update.begin (), all_entries_to_update.end (),
224- [](const BTBEntry &e) { return !(e.isIndirect && !e.isReturn ); });
225- all_entries_to_update.erase (remove_it, all_entries_to_update.end ());
222+ // // only update indirect branches that are not returns
223+ if (getResolvedUpdate ()) {
224+ auto remove_it =
225+ std::remove_if (all_entries_to_update.begin (), all_entries_to_update.end (),
226+ [](const BTBEntry &e) { return !(e.isIndirect && !e.isReturn && e.resolved ); });
227+ all_entries_to_update.erase (remove_it, all_entries_to_update.end ());
228+ } else {
229+ auto remove_it = std::remove_if (all_entries_to_update.begin (), all_entries_to_update.end (),
230+ [](const BTBEntry &e) { return !(e.isIndirect && !e.isReturn ); });
231+ all_entries_to_update.erase (remove_it, all_entries_to_update.end ());
232+ }
226233
227234 // get tage predictions from meta
228235 // TODO: use component idx
Original file line number Diff line number Diff line change @@ -251,15 +251,16 @@ DecoupledBPUWithBTB::generateFinalPredAndCreateBubbles()
251251
252252 // update ubtb/abtb using final S3 prediction
253253 if (predsOfEachStage[numStages - 1 ].btbEntries .size () > 0 ) {
254- ubtb->updateUsingS3Pred (predsOfEachStage[numStages - 1 ]);
255- auto it = fetchStreamQueue.find (fsqId-1 );
256- if (it != fetchStreamQueue.end ()) {
254+ if (ubtb->isEnabled ()) {
255+ ubtb->updateUsingS3Pred (predsOfEachStage[numStages - 1 ]);
256+ }
257+ auto it = fetchStreamQueue.find (fsqId - 1 );
258+ if (it != fetchStreamQueue.end () && abtb->isEnabled ()) {
257259 auto previous_block_startpc = it->second .startPC ;
258260 abtb->updateUsingS3Pred (predsOfEachStage[numStages - 1 ], previous_block_startpc);
259- } else {
261+ } else if (abtb-> isEnabled ()) {
260262 abtb->updateUsingS3Pred (predsOfEachStage[numStages - 1 ], 0 );
261263 }
262-
263264 }
264265
265266 // 4. Record override bubbles and update statistics
You can’t perform that action at this time.
0 commit comments