Skip to content

Commit

Permalink
Clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
ABenC377 committed Dec 17, 2024
1 parent ac0d2cf commit f9ecd29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/include/simeng/branchpredictors/TagePredictor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <cassert>
#include <deque>
#include <map>
#include <vector>
#include <memory>
#include <vector>

#include "simeng/branchpredictors/BranchHistory.hh"
#include "simeng/branchpredictors/BranchPredictor.hh"
Expand Down
12 changes: 6 additions & 6 deletions src/lib/branchpredictors/TagePredictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ BranchPrediction TagePredictor::predict(uint64_t address, BranchType type,
int8_t predTable;
std::shared_ptr<uint64_t[]> indices(new uint64_t[numTageTables_]);
std::shared_ptr<uint64_t[]> tags(new uint64_t[numTageTables_]);
getTaggedPrediction(address, &prediction, &altPrediction, &predTable,
indices, tags);
getTaggedPrediction(address, &prediction, &altPrediction, &predTable, indices,
tags);

// If known offset then overwrite predicted target with this
if (knownOffset != 0) prediction.target = address + knownOffset;
Expand Down Expand Up @@ -89,8 +89,7 @@ BranchPrediction TagePredictor::predict(uint64_t address, BranchType type,
}

// Store prediction data so that update() has the info it needs
ftqEntry newEntry = {predTable, indices, tags,
prediction, altPrediction};
ftqEntry newEntry = {predTable, indices, tags, prediction, altPrediction};
ftq_.push_back(newEntry);

// Speculatively update the global history
Expand Down Expand Up @@ -266,8 +265,9 @@ void TagePredictor::updateTaggedTables(bool isTaken, uint64_t target) {

// Update the usefulness counters if prediction is from a tagged prediction
// table and differs from alt-prediction
if ((predTable != -1) && (pred.isTaken != altPred.isTaken ||
(pred.isTaken && (pred.target != altPred.target)))) {
if ((predTable != -1) &&
(pred.isTaken != altPred.isTaken ||
(pred.isTaken && (pred.target != altPred.target)))) {
bool wasUseful = (pred.isTaken == isTaken);
uint8_t currentU = tageTables_[predTable][indices.get()[predTable]].u;
// Make sure that update is possible
Expand Down

0 comments on commit f9ecd29

Please sign in to comment.