Skip to content

Commit f93db0d

Browse files
committed
cpu: remove formatting-only BTB review noise
Change-Id: I9789aae768c0e4c4b09d954c5846b6423eda5735
1 parent be726a6 commit f93db0d

10 files changed

Lines changed: 467 additions & 421 deletions

File tree

src/cpu/pred/btb/btb_ittage.cc

Lines changed: 114 additions & 77 deletions
Large diffs are not rendered by default.

src/cpu/pred/btb/btb_ittage.hh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,8 @@ class BTBITTAGE : public TimedBaseBTBPredictor
102102
void putPCHistoryForBlock1(Addr startAddr, const boost::dynamic_bitset<> &history,
103103
const boost::dynamic_bitset<> &phistory, const boost::dynamic_bitset<> &bwhistory,
104104
const std::vector<boost::dynamic_bitset<>> &lhistory,
105-
std::vector<FullBTBPrediction> &stagePreds, const FullBTBPrediction &lowerPred) override
106-
{
107-
(void)phistory;
108-
(void)bwhistory;
109-
(void)lhistory;
110-
if (!participatesInBlock1()) {
111-
for (int s = getDelay(); s < stagePreds.size(); s++) {
112-
stagePreds[s].indirectTargets = lowerPred.indirectTargets;
113-
}
114-
return;
115-
}
116-
putPCHistory(startAddr, history, stagePreds);
117-
}
105+
std::vector<FullBTBPrediction> &stagePreds,
106+
const FullBTBPrediction &lowerPred) override;
118107

119108
std::shared_ptr<void> getPredictionMeta() override;
120109

src/cpu/pred/btb/btb_tage.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,25 @@ BTBTAGE::putPCHistory(Addr startPC, const bitset &history, std::vector<FullBTBPr
381381
}
382382
}
383383

384+
void
385+
BTBTAGE::putPCHistoryForBlock1(Addr startAddr, const boost::dynamic_bitset<> &history,
386+
const boost::dynamic_bitset<> &phistory, const boost::dynamic_bitset<> &bwhistory,
387+
const std::vector<boost::dynamic_bitset<>> &lhistory,
388+
std::vector<FullBTBPrediction> &stagePreds, const FullBTBPrediction &lowerPred)
389+
{
390+
(void)phistory;
391+
(void)bwhistory;
392+
(void)lhistory;
393+
if (!participatesInBlock1()) {
394+
for (int s = getDelay(); s < stagePreds.size(); s++) {
395+
stagePreds[s].condTakens = lowerPred.condTakens;
396+
stagePreds[s].tageInfoForMgscs = lowerPred.tageInfoForMgscs;
397+
}
398+
return;
399+
}
400+
putPCHistory(startAddr, history, stagePreds);
401+
}
402+
384403
std::shared_ptr<void>
385404
BTBTAGE::getPredictionMeta()
386405
{

src/cpu/pred/btb/btb_tage.hh

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@
1414
#include "cpu/pred/btb/folded_hist.hh"
1515
#include "cpu/pred/btb/timed_base_pred.hh"
1616

17+
// Conditional includes based on build mode
1718
#ifdef UNIT_TEST
1819
#include "cpu/pred/btb/test/test_dprintf.hh"
19-
2020
#else
2121
#include "debug/DecoupleBP.hh"
2222
#include "debug/TAGEHistory.hh"
2323
#include "debug/TAGEUseful.hh"
2424
#include "params/BTBTAGE.hh"
2525
#include "sim/sim_object.hh"
26-
2726
#endif
2827

2928
namespace gem5
@@ -131,20 +130,8 @@ class BTBTAGE : public TimedBaseBTBPredictor
131130
void putPCHistoryForBlock1(Addr startAddr, const boost::dynamic_bitset<> &history,
132131
const boost::dynamic_bitset<> &phistory, const boost::dynamic_bitset<> &bwhistory,
133132
const std::vector<boost::dynamic_bitset<>> &lhistory,
134-
std::vector<FullBTBPrediction> &stagePreds, const FullBTBPrediction &lowerPred) override
135-
{
136-
(void)phistory;
137-
(void)bwhistory;
138-
(void)lhistory;
139-
if (!participatesInBlock1()) {
140-
for (int s = getDelay(); s < stagePreds.size(); s++) {
141-
stagePreds[s].condTakens = lowerPred.condTakens;
142-
stagePreds[s].tageInfoForMgscs = lowerPred.tageInfoForMgscs;
143-
}
144-
return;
145-
}
146-
putPCHistory(startAddr, history, stagePreds);
147-
}
133+
std::vector<FullBTBPrediction> &stagePreds,
134+
const FullBTBPrediction &lowerPred) override;
148135

149136
std::shared_ptr<void> getPredictionMeta() override;
150137

src/cpu/pred/btb/btb_ubtb.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ namespace test
8282

8383
class UBTB : public TimedBaseBTBPredictor
8484
{
85-
private:
8685
public:
8786
#ifdef UNIT_TEST
8887
UBTB(unsigned numEntries, unsigned tagBits);

0 commit comments

Comments
 (0)