misc: Delete the now unnecessary create methods.

Most create() methods are no longer necessary. This change deletes them,
and occasionally moves some code from them into the constructors they
call.

Change-Id: Icbab29ba280144b892f9b12fac9e29a0839477e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36536
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-10-23 19:34:07 -07:00
parent 6c454ee53b
commit d05a0a4ea1
337 changed files with 56 additions and 2960 deletions

View File

@@ -133,9 +133,3 @@ void
LocalBP::uncondBranch(ThreadID tid, Addr pc, void *&bp_history)
{
}
LocalBP*
LocalBPParams::create() const
{
return new LocalBP(*this);
}

View File

@@ -225,9 +225,3 @@ BiModeBP::updateGlobalHistReg(ThreadID tid, bool taken)
(globalHistoryReg[tid] << 1);
globalHistoryReg[tid] &= historyRegisterMask;
}
BiModeBP*
BiModeBPParams::create() const
{
return new BiModeBP(*this);
}

View File

@@ -362,9 +362,3 @@ LoopPredictor::getSizeInBits() const
loopTableConfidenceBits + loopTableTagBits +
loopTableAgeBits + useDirectionBit);
}
LoopPredictor *
LoopPredictorParams::create() const
{
return new LoopPredictor(*this);
}

View File

@@ -146,9 +146,3 @@ LTAGE::regStats()
{
TAGE::regStats();
}
LTAGE*
LTAGEParams::create() const
{
return new LTAGE(*this);
}

View File

@@ -85,9 +85,3 @@ MultiperspectivePerceptron64KB::createSpecs() {
addSpec(new SGHISTPATH(1, 2, 5, 1.25, 768, 6, *this));
addSpec(new SGHISTPATH(1, 5, 2, 1.3125, 972, 6, *this));
}
MultiperspectivePerceptron64KB*
MultiperspectivePerceptron64KBParams::create() const
{
return new MultiperspectivePerceptron64KB(*this);
}

View File

@@ -64,9 +64,3 @@ MultiperspectivePerceptron8KB::createSpecs() {
addSpec(new SGHISTPATH(0, 4, 3, 1.65625, 0, 6, *this));
addSpec(new SGHISTPATH(1, 2, 5, 2.53125, 0, 5, *this));
}
MultiperspectivePerceptron8KB*
MultiperspectivePerceptron8KBParams::create() const
{
return new MultiperspectivePerceptron8KB(*this);
}

View File

@@ -242,12 +242,6 @@ MPP_TAGE::isHighConfidence(TAGEBase::BranchInfo *bi) const
}
MPP_TAGE*
MPP_TAGEParams::create() const
{
return new MPP_TAGE(*this);
}
bool
MPP_LoopPredictor::calcConf(int index) const
{
@@ -261,12 +255,6 @@ MPP_LoopPredictor::optionalAgeInc() const
return ((random_mt.random<int>() & 7) == 0);
}
MPP_LoopPredictor*
MPP_LoopPredictorParams::create() const
{
return new MPP_LoopPredictor(*this);
}
MPP_StatisticalCorrector::MPP_StatisticalCorrector(
const MPP_StatisticalCorrectorParams &p) : StatisticalCorrector(p),
thirdH(0), pnb(p.pnb), logPnb(p.logPnb), pm(p.pm), gnb(p.gnb),

View File

@@ -196,13 +196,6 @@ MPP_StatisticalCorrector_64KB::getSizeInBits() const
return bits;
}
MPP_StatisticalCorrector_64KB*
MPP_StatisticalCorrector_64KBParams::create() const
{
return new MPP_StatisticalCorrector_64KB(*this);
}
MultiperspectivePerceptronTAGE64KB::MultiperspectivePerceptronTAGE64KB(
const MultiperspectivePerceptronTAGE64KBParams &p)
: MultiperspectivePerceptronTAGE(p)
@@ -222,9 +215,3 @@ MultiperspectivePerceptronTAGE64KB::createSpecs()
addSpec(new RECENCY(9, 3, -1, 2.51, 0, 6, *this));
addSpec(new ACYCLIC(12, -1, -1, 2.0, 0, 6, *this));
}
MultiperspectivePerceptronTAGE64KB*
MultiperspectivePerceptronTAGE64KBParams::create() const
{
return new MultiperspectivePerceptronTAGE64KB(*this);
}

View File

@@ -39,18 +39,6 @@
#include "cpu/pred/multiperspective_perceptron_tage_8KB.hh"
MPP_TAGE_8KB*
MPP_TAGE_8KBParams::create() const
{
return new MPP_TAGE_8KB(*this);
}
MPP_LoopPredictor_8KB*
MPP_LoopPredictor_8KBParams::create() const
{
return new MPP_LoopPredictor_8KB(*this);
}
MPP_StatisticalCorrector_8KB::MPP_StatisticalCorrector_8KB(
const MPP_StatisticalCorrector_8KBParams &p)
: MPP_StatisticalCorrector(p)
@@ -167,12 +155,6 @@ MPP_StatisticalCorrector_8KB::getSizeInBits() const
return bits;
}
MPP_StatisticalCorrector_8KB*
MPP_StatisticalCorrector_8KBParams::create() const
{
return new MPP_StatisticalCorrector_8KB(*this);
}
MultiperspectivePerceptronTAGE8KB::MultiperspectivePerceptronTAGE8KB(
const MultiperspectivePerceptronTAGE8KBParams &p)
: MultiperspectivePerceptronTAGE(p)
@@ -188,9 +170,3 @@ MultiperspectivePerceptronTAGE8KB::createSpecs()
addSpec(new IMLI(1, 2.23, 0, 6, *this));
addSpec(new IMLI(4, 1.98, 0, 6, *this));
}
MultiperspectivePerceptronTAGE8KB*
MultiperspectivePerceptronTAGE8KBParams::create() const
{
return new MultiperspectivePerceptronTAGE8KB(*this);
}

View File

@@ -233,9 +233,3 @@ SimpleIndirectPredictor::getTag(Addr br_addr)
{
return (br_addr >> instShift) & ((0x1<<tagBits)-1);
}
SimpleIndirectPredictor *
SimpleIndirectPredictorParams::create() const
{
return new SimpleIndirectPredictor(*this);
}

View File

@@ -125,9 +125,3 @@ TAGE::uncondBranch(ThreadID tid, Addr br_pc, void* &bp_history)
TageBranchInfo *bi = static_cast<TageBranchInfo*>(bp_history);
tage->updateHistories(tid, br_pc, true, bi->tageBranchInfo, true);
}
TAGE*
TAGEParams::create() const
{
return new TAGE(*this);
}

View File

@@ -790,9 +790,3 @@ TAGEBase::getSizeInBits() const {
bits += logUResetPeriod;
return bits;
}
TAGEBase*
TAGEBaseParams::create() const
{
return new TAGEBase(*this);
}

View File

@@ -58,12 +58,6 @@ TAGE_SC_L_LoopPredictor::optionalAgeInc() const
return (random_mt.random<int>() & 7) == 0;
}
TAGE_SC_L_LoopPredictor *
TAGE_SC_L_LoopPredictorParams::create() const
{
return new TAGE_SC_L_LoopPredictor(*this);
}
TAGE_SC_L::TAGE_SC_L(const TAGE_SC_LParams &p)
: LTAGE(p), statisticalCorrector(p.statistical_corrector)
{

View File

@@ -190,12 +190,6 @@ TAGE_SC_L_64KB_StatisticalCorrector::gUpdates(ThreadID tid, Addr pc,
igehl, inb, logInb, wi, bi);
}
TAGE_SC_L_64KB_StatisticalCorrector*
TAGE_SC_L_64KB_StatisticalCorrectorParams::create() const
{
return new TAGE_SC_L_64KB_StatisticalCorrector(*this);
}
int
TAGE_SC_L_TAGE_64KB::gindex_ext(int index, int bank) const
{
@@ -309,19 +303,7 @@ TAGE_SC_L_TAGE_64KB::handleTAGEUpdate(Addr branch_pc, bool taken,
}
}
TAGE_SC_L_TAGE_64KB*
TAGE_SC_L_TAGE_64KBParams::create() const
{
return new TAGE_SC_L_TAGE_64KB(*this);
}
TAGE_SC_L_64KB::TAGE_SC_L_64KB(const TAGE_SC_L_64KBParams &params)
: TAGE_SC_L(params)
{
}
TAGE_SC_L_64KB*
TAGE_SC_L_64KBParams::create() const
{
return new TAGE_SC_L_64KB(*this);
}

View File

@@ -132,12 +132,6 @@ TAGE_SC_L_8KB_StatisticalCorrector::gUpdates(ThreadID tid, Addr pc, bool taken,
gUpdate(pc, taken, sh->imliCount, im, igehl, inb, logInb, wi, bi);
}
TAGE_SC_L_8KB_StatisticalCorrector*
TAGE_SC_L_8KB_StatisticalCorrectorParams::create() const
{
return new TAGE_SC_L_8KB_StatisticalCorrector(*this);
}
TAGE_SC_L_8KB::TAGE_SC_L_8KB(const TAGE_SC_L_8KBParams &params)
: TAGE_SC_L(params)
{
@@ -316,15 +310,3 @@ TAGE_SC_L_TAGE_8KB::handleTAGEUpdate(Addr branch_pc, bool taken,
gtable[bi->hitBank][bi->hitBankIndex].u++;
}
}
TAGE_SC_L_TAGE_8KB*
TAGE_SC_L_TAGE_8KBParams::create() const
{
return new TAGE_SC_L_TAGE_8KB(*this);
}
TAGE_SC_L_8KB*
TAGE_SC_L_8KBParams::create() const
{
return new TAGE_SC_L_8KB(*this);
}

View File

@@ -343,12 +343,6 @@ TournamentBP::squash(ThreadID tid, void *bp_history)
delete history;
}
TournamentBP*
TournamentBPParams::create() const
{
return new TournamentBP(*this);
}
#ifdef DEBUG
int
TournamentBP::BPHistory::newCount = 0;