Skip to content

Commit ea1a5b2

Browse files
committed
cpu-o3: only update ubtb & abtb when it enabled
Change-Id: If8ad467ec69fc727ce177a942ae3ebc10eceafbe
1 parent f84a311 commit ea1a5b2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/cpu/pred/btb/decoupled_bpred.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)