diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/GOFFObjectWriter.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/MC/XCOFFObjectWriter.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Support/LSP/Protocol.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 17 |
6 files changed, 22 insertions, 13 deletions
diff --git a/llvm/lib/MC/GOFFObjectWriter.cpp b/llvm/lib/MC/GOFFObjectWriter.cpp index d68f4af..71bd397 100644 --- a/llvm/lib/MC/GOFFObjectWriter.cpp +++ b/llvm/lib/MC/GOFFObjectWriter.cpp @@ -440,7 +440,7 @@ public: SetBuffer(Buffer, sizeof(Buffer)); } - ~TextStream() { flush(); } + ~TextStream() override { flush(); } }; } // namespace diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index be8c022..885fa55 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -295,7 +295,7 @@ public: unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName, StringRef Location = {}) override; - virtual void emitDwarfLocLabelDirective(SMLoc Loc, StringRef Name) override; + void emitDwarfLocLabelDirective(SMLoc Loc, StringRef Name) override; MCSymbol *getDwarfLineTableSymbol(unsigned CUID) override; diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index acea3ab..dd1bc2b 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -726,7 +726,7 @@ public: Lexer.setLexHLASMStrings(true); } - ~HLASMAsmParser() { Lexer.setSkipSpace(true); } + ~HLASMAsmParser() override { Lexer.setSkipSpace(true); } bool parseStatement(ParseStatementInfo &Info, MCAsmParserSemaCallback *SI) override; diff --git a/llvm/lib/MC/XCOFFObjectWriter.cpp b/llvm/lib/MC/XCOFFObjectWriter.cpp index fce6b2a..d466009 100644 --- a/llvm/lib/MC/XCOFFObjectWriter.cpp +++ b/llvm/lib/MC/XCOFFObjectWriter.cpp @@ -184,7 +184,7 @@ struct CsectSectionEntry : public SectionEntry { Group->clear(); } - virtual ~CsectSectionEntry() = default; + ~CsectSectionEntry() override = default; }; struct DwarfSectionEntry : public SectionEntry { @@ -220,7 +220,7 @@ struct DwarfSectionEntry : public SectionEntry { DwarfSectionEntry(DwarfSectionEntry &&s) = default; - virtual ~DwarfSectionEntry() = default; + ~DwarfSectionEntry() override = default; }; struct ExceptionTableEntry { @@ -249,7 +249,7 @@ struct ExceptionSectionEntry : public SectionEntry { memcpy(Name, N.data(), N.size()); } - virtual ~ExceptionSectionEntry() = default; + ~ExceptionSectionEntry() override = default; }; struct CInfoSymInfo { @@ -276,7 +276,7 @@ struct CInfoSymSectionEntry : public SectionEntry { std::unique_ptr<CInfoSymInfo> Entry; CInfoSymSectionEntry(StringRef N, int32_t Flags) : SectionEntry(N, Flags) {} - virtual ~CInfoSymSectionEntry() = default; + ~CInfoSymSectionEntry() override = default; void addEntry(std::unique_ptr<CInfoSymInfo> NewEntry) { Entry = std::move(NewEntry); Entry->Offset = sizeof(uint32_t); diff --git a/llvm/lib/Support/LSP/Protocol.cpp b/llvm/lib/Support/LSP/Protocol.cpp index f221263..f8eeb32 100644 --- a/llvm/lib/Support/LSP/Protocol.cpp +++ b/llvm/lib/Support/LSP/Protocol.cpp @@ -96,10 +96,6 @@ static void percentEncode(StringRef Content, std::string &Out) { static std::string percentDecode(StringRef Content) { std::string Result; for (auto I = Content.begin(), E = Content.end(); I != E; ++I) { - if (*I != '%') { - Result += *I; - continue; - } if (*I == '%' && I + 2 < Content.end() && llvm::isHexDigit(*(I + 1)) && llvm::isHexDigit(*(I + 2))) { Result.push_back(llvm::hexFromNibbles(*(I + 1), *(I + 2))); diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 3356516..facb0fa 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4378,8 +4378,21 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor( const SCEV *TC = vputils::getSCEVExprForVPValue(getPlanFor(MainLoopVF).getTripCount(), SE); assert(!isa<SCEVCouldNotCompute>(TC) && "Trip count SCEV must be computable"); - RemainingIterations = - SE.getURemExpr(TC, SE.getElementCount(TCType, MainLoopVF * IC)); + const SCEV *KnownMinTC; + bool ScalableTC = match(TC, m_scev_c_Mul(m_SCEV(KnownMinTC), m_SCEVVScale())); + // Use versions of TC and VF in which both are either scalable or fixed. + if (ScalableTC == MainLoopVF.isScalable()) + RemainingIterations = + SE.getURemExpr(TC, SE.getElementCount(TCType, MainLoopVF * IC)); + else if (ScalableTC) { + const SCEV *EstimatedTC = SE.getMulExpr( + KnownMinTC, + SE.getConstant(TCType, CM.getVScaleForTuning().value_or(1))); + RemainingIterations = SE.getURemExpr( + EstimatedTC, SE.getElementCount(TCType, MainLoopVF * IC)); + } else + RemainingIterations = + SE.getURemExpr(TC, SE.getElementCount(TCType, EstimatedRuntimeVF * IC)); // No iterations left to process in the epilogue. if (RemainingIterations->isZero()) |
