From 3f3930a451e118e82885a6dd20e3918427b816c2 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 25 Jul 2022 23:00:59 -0700 Subject: Remove redundaunt virtual specifiers (NFC) Identified with tidy-modernize-use-override. --- .../bugprone/SharedPtrArrayMismatchCheck.h | 2 +- clang-tools-extra/clangd/AST.cpp | 2 +- clang-tools-extra/clangd/support/ThreadsafeFS.cpp | 2 +- clang/lib/Basic/Targets/X86.h | 4 ++-- clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 23 +++++++++++----------- clang/lib/CodeGen/MicrosoftCXXABI.cpp | 2 +- clang/lib/Sema/Sema.cpp | 6 +++--- .../Checkers/InnerPointerChecker.cpp | 6 +++--- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 11 +++++------ .../StaticAnalyzer/Core/BugReporterVisitors.cpp | 5 ++--- .../lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 2 +- llvm/lib/MC/ELFObjectWriter.cpp | 5 ++--- llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp | 4 ++-- llvm/lib/Target/RISCV/RISCVInstrInfo.h | 12 +++++------ llvm/lib/Target/X86/X86InstrInfo.h | 2 +- llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 10 ++++------ .../Transforms/InstCombine/InstCombineInternal.h | 7 +++---- polly/include/polly/CodeGen/BlockGenerators.h | 7 +++---- polly/include/polly/CodeGen/LoopGeneratorsGOMP.h | 2 +- polly/include/polly/CodeGen/LoopGeneratorsKMP.h | 2 +- polly/include/polly/ScopPass.h | 2 +- polly/lib/CodeGen/CodegenCleanup.cpp | 8 ++++---- polly/lib/Support/DumpFunctionPass.cpp | 4 ++-- polly/lib/Support/DumpModulePass.cpp | 4 ++-- polly/lib/Transform/DeLICM.cpp | 8 ++++---- polly/lib/Transform/FlattenSchedule.cpp | 8 ++++---- polly/lib/Transform/Simplify.cpp | 8 ++++---- 27 files changed, 74 insertions(+), 84 deletions(-) diff --git a/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h b/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h index bb549c5..95b8e22 100644 --- a/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h +++ b/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h @@ -28,7 +28,7 @@ public: SharedPtrArrayMismatchCheck(StringRef Name, ClangTidyContext *Context); protected: - virtual SmartPtrClassMatcher getSmartPointerClassMatcher() const override; + SmartPtrClassMatcher getSmartPointerClassMatcher() const override; }; } // namespace bugprone diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp index 0c67c54..f7d526f 100644 --- a/clang-tools-extra/clangd/AST.cpp +++ b/clang-tools-extra/clangd/AST.cpp @@ -368,7 +368,7 @@ std::string printType(const QualType QT, const DeclContext &CurContext, public: PrintCB(const DeclContext *CurContext) : CurContext(CurContext) {} virtual ~PrintCB() {} - virtual bool isScopeVisible(const DeclContext *DC) const override { + bool isScopeVisible(const DeclContext *DC) const override { return DC->Encloses(CurContext); } diff --git a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp index efd7e8c..dca0476 100644 --- a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp +++ b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp @@ -53,7 +53,7 @@ private: assert(this->Wrapped); } - virtual llvm::ErrorOr> + llvm::ErrorOr> getBuffer(const llvm::Twine &Name, int64_t FileSize, bool RequiresNullTerminator, bool /*IsVolatile*/) override { return Wrapped->getBuffer(Name, FileSize, RequiresNullTerminator, diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index ea98dcf..0affa58 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -229,12 +229,12 @@ public: bool validateInputSize(const llvm::StringMap &FeatureMap, StringRef Constraint, unsigned Size) const override; - virtual bool + bool checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const override { return true; }; - virtual bool + bool checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const override { return true; }; diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h index 1d30c50..ff585ef 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h @@ -186,17 +186,16 @@ public: /// Emit call to void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 /// global_tid, int proc_bind) to generate code for 'proc_bind' clause. - virtual void emitProcBindClause(CodeGenFunction &CGF, - llvm::omp::ProcBindKind ProcBind, - SourceLocation Loc) override; + void emitProcBindClause(CodeGenFunction &CGF, + llvm::omp::ProcBindKind ProcBind, + SourceLocation Loc) override; /// Emits call to void __kmpc_push_num_threads(ident_t *loc, kmp_int32 /// global_tid, kmp_int32 num_threads) to generate code for 'num_threads' /// clause. /// \param NumThreads An integer value of threads. - virtual void emitNumThreadsClause(CodeGenFunction &CGF, - llvm::Value *NumThreads, - SourceLocation Loc) override; + void emitNumThreadsClause(CodeGenFunction &CGF, llvm::Value *NumThreads, + SourceLocation Loc) override; /// This function ought to emit, in the general case, a call to // the openmp runtime kmpc_push_num_teams. In NVPTX backend it is not needed @@ -300,12 +299,12 @@ public: /// SimpleReduction Emit reduction operation only. Used for omp simd /// directive on the host. /// ReductionKind The kind of reduction to perform. - virtual void emitReduction(CodeGenFunction &CGF, SourceLocation Loc, - ArrayRef Privates, - ArrayRef LHSExprs, - ArrayRef RHSExprs, - ArrayRef ReductionOps, - ReductionOptionsTy Options) override; + void emitReduction(CodeGenFunction &CGF, SourceLocation Loc, + ArrayRef Privates, + ArrayRef LHSExprs, + ArrayRef RHSExprs, + ArrayRef ReductionOps, + ReductionOptionsTy Options) override; /// Returns specified OpenMP runtime function for the current OpenMP /// implementation. Specialized for the NVPTX device. diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index 2bc1e8e..f0c4565 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -782,7 +782,7 @@ public: LoadVTablePtr(CodeGenFunction &CGF, Address This, const CXXRecordDecl *RD) override; - virtual bool + bool isPermittedToBeHomogeneousAggregate(const CXXRecordDecl *RD) const override; private: diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 326010d..95bc13f 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -137,9 +137,9 @@ public: void reset() { S = nullptr; } - virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason, - SrcMgr::CharacteristicKind FileType, - FileID PrevFID) override { + void FileChanged(SourceLocation Loc, FileChangeReason Reason, + SrcMgr::CharacteristicKind FileType, + FileID PrevFID) override { if (!S) return; switch (Reason) { diff --git a/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp index 895212d..b673b51 100644 --- a/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp @@ -55,9 +55,9 @@ public: ID.AddPointer(getTag()); } - virtual PathDiagnosticPieceRef - VisitNode(const ExplodedNode *N, BugReporterContext &BRC, - PathSensitiveBugReport &BR) override; + PathDiagnosticPieceRef VisitNode(const ExplodedNode *N, + BugReporterContext &BRC, + PathSensitiveBugReport &BR) override; // FIXME: Scan the map once in the visitor's constructor and do a direct // lookup by region. diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 3646470..adedc9c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -852,9 +852,8 @@ protected: return false; } - virtual bool - wasModifiedInFunction(const ExplodedNode *CallEnterN, - const ExplodedNode *CallExitEndN) override { + bool wasModifiedInFunction(const ExplodedNode *CallEnterN, + const ExplodedNode *CallExitEndN) override { if (!doesFnIntendToHandleOwnership( CallExitEndN->getFirstPred()->getLocationContext()->getDecl(), CallExitEndN->getState()->getAnalysisManager().getASTContext())) @@ -885,7 +884,7 @@ protected: "later deallocation"); } - virtual PathDiagnosticPieceRef + PathDiagnosticPieceRef maybeEmitNoteForObjCSelf(PathSensitiveBugReport &R, const ObjCMethodCall &Call, const ExplodedNode *N) override { @@ -893,7 +892,7 @@ protected: return nullptr; } - virtual PathDiagnosticPieceRef + PathDiagnosticPieceRef maybeEmitNoteForCXXThis(PathSensitiveBugReport &R, const CXXConstructorCall &Call, const ExplodedNode *N) override { @@ -901,7 +900,7 @@ protected: return nullptr; } - virtual PathDiagnosticPieceRef + PathDiagnosticPieceRef maybeEmitNoteForParameters(PathSensitiveBugReport &R, const CallEvent &Call, const ExplodedNode *N) override { // TODO: Factor the logic of "what constitutes as an entity being passed diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index b99c219..3a90c37 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -530,9 +530,8 @@ public: private: /// \return Whether \c RegionOfInterest was modified at \p CurrN compared to /// the value it holds in \p CallExitBeginN. - virtual bool - wasModifiedBeforeCallExit(const ExplodedNode *CurrN, - const ExplodedNode *CallExitBeginN) override; + bool wasModifiedBeforeCallExit(const ExplodedNode *CurrN, + const ExplodedNode *CallExitBeginN) override; /// Attempts to find the region of interest in a given record decl, /// by either following the base classes or fields. diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index 4a3ab006..d1915fd4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -198,7 +198,7 @@ public: SDAGSwitchLowering(SelectionDAGBuilder *sdb, FunctionLoweringInfo &funcinfo) : SwitchCG::SwitchLowering(funcinfo), SDB(sdb) {} - virtual void addSuccessorWithProb( + void addSuccessorWithProb( MachineBasicBlock *Src, MachineBasicBlock *Dst, BranchProbability Prob = BranchProbability::getUnknown()) override { SDB->addSuccessorWithProb(Src, Dst, Prob); diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 0b4e986..f6360c4 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -293,9 +293,8 @@ public: : ELFObjectWriter(std::move(MOTW)), OS(OS), DwoOS(DwoOS), IsLittleEndian(IsLittleEndian) {} - virtual bool checkRelocation(MCContext &Ctx, SMLoc Loc, - const MCSectionELF *From, - const MCSectionELF *To) override { + bool checkRelocation(MCContext &Ctx, SMLoc Loc, const MCSectionELF *From, + const MCSectionELF *To) override { if (isDwoSection(*From)) { Ctx.reportError(Loc, "A dwo section may not contain relocations"); return false; diff --git a/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp b/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp index cb6d53e..5dc2bf0 100644 --- a/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp +++ b/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp @@ -31,8 +31,8 @@ public: : CombinerInfo(/*AllowIllegalOps*/ true, /*ShouldLegalizeIllegal*/ false, /*LegalizerInfo*/ nullptr, /*EnableOpt*/ false, /*EnableOptSize*/ false, /*EnableMinSize*/ false) {} - virtual bool combine(GISelChangeObserver &Observer, MachineInstr &MI, - MachineIRBuilder &B) const override; + bool combine(GISelChangeObserver &Observer, MachineInstr &MI, + MachineIRBuilder &B) const override; }; bool MipsPreLegalizerCombinerInfo::combine(GISelChangeObserver &Observer, diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.h b/llvm/lib/Target/RISCV/RISCVInstrInfo.h index 506a0a4..beb49f5 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.h +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.h @@ -149,17 +149,15 @@ public: std::vector &RepeatedSequenceLocs) const override; // Return if/how a given MachineInstr should be outlined. - virtual outliner::InstrType - getOutliningType(MachineBasicBlock::iterator &MBBI, - unsigned Flags) const override; + outliner::InstrType getOutliningType(MachineBasicBlock::iterator &MBBI, + unsigned Flags) const override; // Insert a custom frame for outlined functions. - virtual void - buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF, - const outliner::OutlinedFunction &OF) const override; + void buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF, + const outliner::OutlinedFunction &OF) const override; // Insert a call to an outlined function into a given basic block. - virtual MachineBasicBlock::iterator + MachineBasicBlock::iterator insertOutlinedCall(Module &M, MachineBasicBlock &MBB, MachineBasicBlock::iterator &It, MachineFunction &MF, outliner::Candidate &C) const override; diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index 98da00c..81729e3 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -544,7 +544,7 @@ public: ArrayRef> getSerializableDirectMachineOperandTargetFlags() const override; - virtual outliner::OutlinedFunction getOutliningCandidateInfo( + outliner::OutlinedFunction getOutliningCandidateInfo( std::vector &RepeatedSequenceLocs) const override; bool isFunctionSafeToOutlineFrom(MachineFunction &MF, diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index 589bcb4..83252fe 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -4500,9 +4500,8 @@ struct AAAlignImpl : AAAlign { // to avoid making the alignment explicit if it did not improve. /// See AbstractAttribute::getDeducedAttributes - virtual void - getDeducedAttributes(LLVMContext &Ctx, - SmallVectorImpl &Attrs) const override { + void getDeducedAttributes(LLVMContext &Ctx, + SmallVectorImpl &Attrs) const override { if (getAssumedAlign() > 1) Attrs.emplace_back( Attribute::getWithAlignment(Ctx, Align(getAssumedAlign()))); @@ -4972,9 +4971,8 @@ struct AANoCaptureImpl : public AANoCapture { ChangeStatus updateImpl(Attributor &A) override; /// see AbstractAttribute::isAssumedNoCaptureMaybeReturned(...). - virtual void - getDeducedAttributes(LLVMContext &Ctx, - SmallVectorImpl &Attrs) const override { + void getDeducedAttributes(LLVMContext &Ctx, + SmallVectorImpl &Attrs) const override { if (!isAssumedNoCaptureMaybeReturned()) return; diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index 827b255..664226e 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -597,10 +597,9 @@ public: /// demanded bits. bool SimplifyDemandedInstructionBits(Instruction &Inst); - virtual Value * - SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, APInt &UndefElts, - unsigned Depth = 0, - bool AllowMultipleUsers = false) override; + Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, + APInt &UndefElts, unsigned Depth = 0, + bool AllowMultipleUsers = false) override; /// Canonicalize the position of binops relative to shufflevector. Instruction *foldVectorBinop(BinaryOperator &Inst); diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h index 1fc5a4c..a30eb8b 100644 --- a/polly/include/polly/CodeGen/BlockGenerators.h +++ b/polly/include/polly/CodeGen/BlockGenerators.h @@ -974,7 +974,7 @@ private: /// @param BBMap A mapping from old values to their new values in this block. /// @param LTS A mapping from loops virtual canonical induction variable to /// their new values. - virtual void + void generateScalarStores(ScopStmt &Stmt, LoopToScevMapT <S, ValueMapT &BBMAp, __isl_keep isl_id_to_ast_expr *NewAccesses) override; @@ -988,9 +988,8 @@ private: /// @param BBMap A mapping from old values to their new values /// (for values recalculated within this basic block). /// @param LTS A map from old loops to new induction variables as SCEVs. - virtual void copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst, - ValueMapT &BBMap, - LoopToScevMapT <S) override; + void copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst, ValueMapT &BBMap, + LoopToScevMapT <S) override; }; } // namespace polly #endif diff --git a/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h b/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h index 83d9b4b..4cc4f39 100644 --- a/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h +++ b/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h @@ -47,7 +47,7 @@ public: void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) override; - virtual Function *prepareSubFnDefinition(Function *F) const override; + Function *prepareSubFnDefinition(Function *F) const override; std::tuple createSubFn(Value *Stride, AllocaInst *Struct, SetVector UsedValues, diff --git a/polly/include/polly/CodeGen/LoopGeneratorsKMP.h b/polly/include/polly/CodeGen/LoopGeneratorsKMP.h index 9a7c7561..245a63c7 100644 --- a/polly/include/polly/CodeGen/LoopGeneratorsKMP.h +++ b/polly/include/polly/CodeGen/LoopGeneratorsKMP.h @@ -73,7 +73,7 @@ public: void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) override; - virtual Function *prepareSubFnDefinition(Function *F) const override; + Function *prepareSubFnDefinition(Function *F) const override; std::tuple createSubFn(Value *Stride, AllocaInst *Struct, SetVector UsedValues, diff --git a/polly/include/polly/ScopPass.h b/polly/include/polly/ScopPass.h index c9d325a..144cfd1 100644 --- a/polly/include/polly/ScopPass.h +++ b/polly/include/polly/ScopPass.h @@ -175,7 +175,7 @@ protected: /// getAnalysisUsage - Subclasses that override getAnalysisUsage /// must call this. /// - virtual void getAnalysisUsage(AnalysisUsage &AU) const override; + void getAnalysisUsage(AnalysisUsage &AU) const override; private: bool runOnRegion(Region *R, RGPassManager &RGM) override; diff --git a/polly/lib/CodeGen/CodegenCleanup.cpp b/polly/lib/CodeGen/CodegenCleanup.cpp index 6ecb1f4..100bc93 100644 --- a/polly/lib/CodeGen/CodegenCleanup.cpp +++ b/polly/lib/CodeGen/CodegenCleanup.cpp @@ -40,9 +40,9 @@ public: /// @name FunctionPass interface //@{ - virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {} + void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {} - virtual bool doInitialization(Module &M) override { + bool doInitialization(Module &M) override { assert(!FPM); FPM = new llvm::legacy::FunctionPassManager(&M); @@ -106,7 +106,7 @@ public: return FPM->doInitialization(); } - virtual bool doFinalization(Module &M) override { + bool doFinalization(Module &M) override { bool Result = FPM->doFinalization(); delete FPM; @@ -115,7 +115,7 @@ public: return Result; } - virtual bool runOnFunction(llvm::Function &F) override { + bool runOnFunction(llvm::Function &F) override { if (!F.hasFnAttribute("polly-optimized")) { LLVM_DEBUG( dbgs() << F.getName() diff --git a/polly/lib/Support/DumpFunctionPass.cpp b/polly/lib/Support/DumpFunctionPass.cpp index 9256f12..b4a10ab 100644 --- a/polly/lib/Support/DumpFunctionPass.cpp +++ b/polly/lib/Support/DumpFunctionPass.cpp @@ -100,11 +100,11 @@ public: /// @name FunctionPass interface //@{ - virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override { + void getAnalysisUsage(llvm::AnalysisUsage &AU) const override { AU.setPreservesAll(); } - virtual bool runOnFunction(llvm::Function &F) override { + bool runOnFunction(llvm::Function &F) override { runDumpFunction(F, Suffix); return false; } diff --git a/polly/lib/Support/DumpModulePass.cpp b/polly/lib/Support/DumpModulePass.cpp index 5df74b2..c1c27ef 100644 --- a/polly/lib/Support/DumpModulePass.cpp +++ b/polly/lib/Support/DumpModulePass.cpp @@ -71,11 +71,11 @@ public: /// @name ModulePass interface //@{ - virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override { + void getAnalysisUsage(llvm::AnalysisUsage &AU) const override { AU.setPreservesAll(); } - virtual bool runOnModule(llvm::Module &M) override { + bool runOnModule(llvm::Module &M) override { runDumpModule(M, Filename, IsSuffix); return false; } diff --git a/polly/lib/Transform/DeLICM.cpp b/polly/lib/Transform/DeLICM.cpp index 9948e08..51e7013 100644 --- a/polly/lib/Transform/DeLICM.cpp +++ b/polly/lib/Transform/DeLICM.cpp @@ -1428,13 +1428,13 @@ public: static char ID; explicit DeLICMWrapperPass() : ScopPass(ID) {} - virtual void getAnalysisUsage(AnalysisUsage &AU) const override { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequiredTransitive(); AU.addRequired(); AU.setPreservesAll(); } - virtual bool runOnScop(Scop &S) override { + bool runOnScop(Scop &S) override { // Free resources for previous scop's computation, if not yet done. releaseMemory(); @@ -1444,7 +1444,7 @@ public: return Impl->isModified(); } - virtual void printScop(raw_ostream &OS, Scop &S) const override { + void printScop(raw_ostream &OS, Scop &S) const override { if (!Impl) return; assert(Impl->getScop() == &S); @@ -1453,7 +1453,7 @@ public: Impl->print(OS); } - virtual void releaseMemory() override { Impl.reset(); } + void releaseMemory() override { Impl.reset(); } }; char DeLICMWrapperPass::ID; diff --git a/polly/lib/Transform/FlattenSchedule.cpp b/polly/lib/Transform/FlattenSchedule.cpp index 27de81f..53e230b 100644 --- a/polly/lib/Transform/FlattenSchedule.cpp +++ b/polly/lib/Transform/FlattenSchedule.cpp @@ -47,12 +47,12 @@ public: static char ID; explicit FlattenSchedule() : ScopPass(ID) {} - virtual void getAnalysisUsage(AnalysisUsage &AU) const override { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequiredTransitive(); AU.setPreservesAll(); } - virtual bool runOnScop(Scop &S) override { + bool runOnScop(Scop &S) override { // Keep a reference to isl_ctx to ensure that it is not freed before we free // OldSchedule. IslCtx = S.getSharedIslCtx(); @@ -79,7 +79,7 @@ public: return false; } - virtual void printScop(raw_ostream &OS, Scop &S) const override { + void printScop(raw_ostream &OS, Scop &S) const override { OS << "Schedule before flattening {\n"; printSchedule(OS, OldSchedule, 4); OS << "}\n\n"; @@ -89,7 +89,7 @@ public: OS << "}\n"; } - virtual void releaseMemory() override { + void releaseMemory() override { OldSchedule = {}; IslCtx.reset(); } diff --git a/polly/lib/Transform/Simplify.cpp b/polly/lib/Transform/Simplify.cpp index f6cbfce..27e865a 100644 --- a/polly/lib/Transform/Simplify.cpp +++ b/polly/lib/Transform/Simplify.cpp @@ -762,13 +762,13 @@ public: explicit SimplifyWrapperPass(int CallNo = 0) : ScopPass(ID), CallNo(CallNo) {} - virtual void getAnalysisUsage(AnalysisUsage &AU) const override { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequiredTransitive(); AU.addRequired(); AU.setPreservesAll(); } - virtual bool runOnScop(Scop &S) override { + bool runOnScop(Scop &S) override { LoopInfo *LI = &getAnalysis().getLoopInfo(); Impl.emplace(CallNo); @@ -777,12 +777,12 @@ public: return false; } - virtual void printScop(raw_ostream &OS, Scop &S) const override { + void printScop(raw_ostream &OS, Scop &S) const override { if (Impl) Impl->printScop(OS, S); } - virtual void releaseMemory() override { Impl.reset(); } + void releaseMemory() override { Impl.reset(); } }; char SimplifyWrapperPass::ID; -- cgit v1.1