Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions llvm/include/llvm/CodeGen/BasicTTIImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
protected:
explicit BasicTTIImplBase(const TargetMachine *TM, const DataLayout &DL)
: BaseT(DL) {}
virtual ~BasicTTIImplBase() = default;
~BasicTTIImplBase() override = default;

using TargetTransformInfoImplBase::DL;

Expand Down Expand Up @@ -821,13 +821,13 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
SimplifyAndSetOp);
}

virtual std::optional<unsigned>
std::optional<unsigned>
getCacheSize(TargetTransformInfo::CacheLevel Level) const override {
return std::optional<unsigned>(
getST()->getCacheSize(static_cast<unsigned>(Level)));
}

virtual std::optional<unsigned>
std::optional<unsigned>
getCacheAssociativity(TargetTransformInfo::CacheLevel Level) const override {
std::optional<unsigned> TargetResult =
getST()->getCacheAssociativity(static_cast<unsigned>(Level));
Expand All @@ -838,31 +838,31 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
return BaseT::getCacheAssociativity(Level);
}

virtual unsigned getCacheLineSize() const override {
unsigned getCacheLineSize() const override {
return getST()->getCacheLineSize();
}

virtual unsigned getPrefetchDistance() const override {
unsigned getPrefetchDistance() const override {
return getST()->getPrefetchDistance();
}

virtual unsigned getMinPrefetchStride(unsigned NumMemAccesses,
unsigned NumStridedMemAccesses,
unsigned NumPrefetches,
bool HasCall) const override {
unsigned getMinPrefetchStride(unsigned NumMemAccesses,
unsigned NumStridedMemAccesses,
unsigned NumPrefetches,
bool HasCall) const override {
return getST()->getMinPrefetchStride(NumMemAccesses, NumStridedMemAccesses,
NumPrefetches, HasCall);
}

virtual unsigned getMaxPrefetchIterationsAhead() const override {
unsigned getMaxPrefetchIterationsAhead() const override {
return getST()->getMaxPrefetchIterationsAhead();
}

virtual bool enableWritePrefetching() const override {
bool enableWritePrefetching() const override {
return getST()->enableWritePrefetching();
}

virtual bool shouldPrefetchAddressSpace(unsigned AS) const override {
bool shouldPrefetchAddressSpace(unsigned AS) const override {
return getST()->shouldPrefetchAddressSpace(AS);
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/CodeGenTargetMachineImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LLVM_ABI CodeGenTargetMachineImpl : public TargetMachine {

/// Create a pass configuration object to be used by addPassToEmitX methods
/// for generating a pipeline of CodeGen passes.
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;

/// Add passes to the specified pass manager to get the specified file
/// emitted. Typically this will involve several steps of code generation.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/DebugHandlerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class DebugHandlerBase : public AsmPrinterHandler {

// AsmPrinterHandler overrides.
public:
virtual ~DebugHandlerBase() override;
~DebugHandlerBase() override;

void beginModule(Module *M) override;

Expand Down
9 changes: 4 additions & 5 deletions llvm/include/llvm/CodeGen/DroppedVariableStatsMIR.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ class LLVM_ABI DroppedVariableStatsMIR : public DroppedVariableStats {
StringRef FuncOrModName);
/// Override base class method to run on an llvm::MachineFunction
/// specifically.
virtual void
visitEveryInstruction(unsigned &DroppedCount,
DenseMap<VarID, DILocation *> &InlinedAtsMap,
VarID Var) override;
void visitEveryInstruction(unsigned &DroppedCount,
DenseMap<VarID, DILocation *> &InlinedAtsMap,
VarID Var) override;
/// Override base class method to run on DBG_VALUEs specifically.
virtual void visitEveryDebugRecord(
void visitEveryDebugRecord(
DenseSet<VarID> &VarIDSet,
DenseMap<StringRef, DenseMap<VarID, DILocation *>> &InlinedAtsMap,
StringRef FuncName, bool Before) override;
Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ class UniqueMachineInstr : public FoldingSetNode {
// A CSE config for fully optimized builds.
class LLVM_ABI CSEConfigFull : public CSEConfigBase {
public:
virtual ~CSEConfigFull() = default;
~CSEConfigFull() override = default;
bool shouldCSEOpc(unsigned Opc) override;
};

// Commonly used for O0 config.
class LLVM_ABI CSEConfigConstantOnly : public CSEConfigBase {
public:
virtual ~CSEConfigConstantOnly() = default;
~CSEConfigConstantOnly() override = default;
bool shouldCSEOpc(unsigned Opc) override;
};

Expand Down Expand Up @@ -118,7 +118,7 @@ class LLVM_ABI GISelCSEInfo : public GISelChangeObserver {
public:
GISelCSEInfo() = default;

virtual ~GISelCSEInfo();
~GISelCSEInfo() override;

void setMF(MachineFunction &MF);

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/GlobalISel/Combiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Combiner : public GIMatchTableExecutor {
Combiner(MachineFunction &MF, CombinerInfo &CInfo,
const TargetPassConfig *TPC, GISelValueTracking *VT,
GISelCSEInfo *CSEInfo = nullptr);
virtual ~Combiner();
~Combiner() override;

virtual bool tryCombineAll(MachineInstr &I) const = 0;

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class LLVM_ABI GISelValueTracking : public GISelChangeObserver {

public:
GISelValueTracking(MachineFunction &MF, unsigned MaxDepth = 6);
~GISelValueTracking() = default;
~GISelValueTracking() override = default;

const MachineFunction &getMachineFunction() const { return MF; }

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ class IRTranslator : public MachineFunctionPass {
IRT->addSuccessorWithProb(Src, Dst, Prob);
}

virtual ~GISelSwitchLowering() = default;
~GISelSwitchLowering() override = default;

private:
IRTranslator *IRT;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GISelObserverWrapper;

class LLVM_ABI InstructionSelector : public GIMatchTableExecutor {
public:
virtual ~InstructionSelector();
~InstructionSelector() override;

/// Select the (possibly generic) instruction \p I to only use target-specific
/// opcodes. It is OK to insert multiple instructions, but they cannot be
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/MachineModuleSlotTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class LLVM_ABI MachineModuleSlotTracker : public ModuleSlotTracker {
MachineModuleSlotTracker(const MachineModuleInfo &MMI,
const MachineFunction *MF,
bool ShouldInitializeAllMetadata = true);
~MachineModuleSlotTracker();
~MachineModuleSlotTracker() override;

void collectMachineMDNodes(MachineMDNodeListType &L) const;
};
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/MachineOutliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ struct GlobalOutlinedFunction : public OutlinedFunction {
}

GlobalOutlinedFunction() = delete;
~GlobalOutlinedFunction() = default;
~GlobalOutlinedFunction() override = default;
};

} // namespace outliner
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/ResourcePriorityQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace llvm {

public:
ResourcePriorityQueue(SelectionDAGISel *IS);
~ResourcePriorityQueue();
~ResourcePriorityQueue() override;

bool isBottomUp() const override { return false; }

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/TargetRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class LLVM_ABI TargetRegisterInfo : public MCRegisterInfo {
unsigned Mode = 0);

public:
virtual ~TargetRegisterInfo();
~TargetRegisterInfo() override;

/// Return the number of registers for the function. (may overestimate)
virtual unsigned getNumSupportedRegs(const MachineFunction &) const {
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/VLIWMachineScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class ConvergingVLIWScheduler : public MachineSchedStrategy {
enum { TopQID = 1, BotQID = 2, LogMaxQID = 2 };

ConvergingVLIWScheduler() : Top(TopQID, "TopQ"), Bot(BotQID, "BotQ") {}
virtual ~ConvergingVLIWScheduler() = default;
~ConvergingVLIWScheduler() override = default;

void initialize(ScheduleDAGMI *dag) override;

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class DwarfUnit : public DIEUnit {
const DIE &TyDIE);

protected:
~DwarfUnit();
~DwarfUnit() override;

/// Create new static data member DIE.
DIE *getOrCreateStaticMemberDIE(const DIDerivedType *DT);
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/GlobalISel/Combiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Combiner::WorkListMaintainer : public GISelChangeObserver {
static std::unique_ptr<WorkListMaintainer>
create(Level Lvl, WorkListTy &WorkList, MachineRegisterInfo &MRI);

virtual ~WorkListMaintainer() = default;
~WorkListMaintainer() override = default;

void reportFullyCreatedInstrs() {
LLVM_DEBUG({
Expand Down Expand Up @@ -95,7 +95,7 @@ class Combiner::WorkListMaintainerImpl : public Combiner::WorkListMaintainer {
WorkListMaintainerImpl(WorkListTy &WorkList, MachineRegisterInfo &MRI)
: WorkList(WorkList), MRI(MRI) {}

virtual ~WorkListMaintainerImpl() = default;
~WorkListMaintainerImpl() override = default;

void reset() override {
DeferList.clear();
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class DILocationVerifier : public GISelChangeObserver {

public:
DILocationVerifier() = default;
~DILocationVerifier() = default;
~DILocationVerifier() override = default;

const Instruction *getCurrentInst() const { return CurrInst; }
void setCurrentInst(const Instruction *Inst) { CurrInst = Inst; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class LiveDebugValuesLegacy : public MachineFunctionPass {
static char ID;

LiveDebugValuesLegacy();
~LiveDebugValuesLegacy() = default;
~LiveDebugValuesLegacy() override = default;

/// Calculate the liveness information for the given machine function.
bool runOnMachineFunction(MachineFunction &MF) override;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ class VarLocBasedLDV : public LDVImpl {
/// Default construct and initialize the pass.
VarLocBasedLDV();

~VarLocBasedLDV();
~VarLocBasedLDV() override;

/// Print to ostream with a message.
void printVarLocInMBB(const MachineFunction &MF, const VarLocInMBB &V,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/MachineBasicBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ class SlotIndexUpdateDelegate : public MachineFunction::Delegate {
MF.setDelegate(this);
}

~SlotIndexUpdateDelegate() {
~SlotIndexUpdateDelegate() override {
MF.resetDelegate(this);
for (auto MI : Insertions)
Indexes->insertMachineInstrInMaps(*MI);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/PeepholeOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class CopyRewriter : public Rewriter {
CopyRewriter(MachineInstr &MI) : Rewriter(MI) {
assert(MI.isCopy() && "Expected copy instruction");
}
virtual ~CopyRewriter() = default;
~CopyRewriter() override = default;

bool getNextRewritableSource(RegSubRegPair &Src,
RegSubRegPair &Dst) override {
Expand Down
16 changes: 8 additions & 8 deletions llvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,14 @@ class AsmPrinterHandlerTest : public AsmPrinterFixtureBase {

public:
TestHandler(AsmPrinterHandlerTest &Test) : Test(Test) {}
virtual ~TestHandler() {}
virtual void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
virtual void beginModule(Module *M) override { Test.BeginCount++; }
virtual void endModule() override { Test.EndCount++; }
virtual void beginFunction(const MachineFunction *MF) override {}
virtual void endFunction(const MachineFunction *MF) override {}
virtual void beginInstruction(const MachineInstr *MI) override {}
virtual void endInstruction() override {}
~TestHandler() override {}
void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
void beginModule(Module *M) override { Test.BeginCount++; }
void endModule() override { Test.EndCount++; }
void beginFunction(const MachineFunction *MF) override {}
void endFunction(const MachineFunction *MF) override {}
void beginInstruction(const MachineInstr *MI) override {}
void endInstruction() override {}
};

protected:
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/CodeGen/InstrRefLDVTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class InstrRefLDVTest : public testing::Test {

InstrRefLDVTest() : Ctx(), Mod(std::make_unique<Module>("beehives", Ctx)) {}

void SetUp() {
void SetUp() override {
// Boilerplate that creates a MachineFunction and associated blocks.

Mod->setDataLayout("e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-"
Expand Down