From fb38a0e0ac66adff52898f71143f5b898901067a Mon Sep 17 00:00:00 2001 From: Rong Xu Date: Tue, 1 Oct 2019 18:06:50 +0000 Subject: [PATCH] [PGO] Fix typos from r359612. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373369 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ProfileData/InstrProf.h | 6 +++--- include/llvm/ProfileData/InstrProfReader.h | 2 +- lib/ProfileData/InstrProf.cpp | 12 ++++++------ lib/ProfileData/InstrProfReader.cpp | 4 ++-- lib/ProfileData/InstrProfWriter.cpp | 2 +- tools/llvm-profdata/llvm-profdata.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/llvm/ProfileData/InstrProf.h b/include/llvm/ProfileData/InstrProf.h index 8f9985c03d4..c26f7694999 100644 --- a/include/llvm/ProfileData/InstrProf.h +++ b/include/llvm/ProfileData/InstrProf.h @@ -630,8 +630,8 @@ struct OverlapStats { FuncHash = Hash; } - Error accumuateCounts(const std::string &BaseFilename, - const std::string &TestFilename, bool IsCS); + Error accumulateCounts(const std::string &BaseFilename, + const std::string &TestFilename, bool IsCS); void addOneMismatch(const CountSumOrPercent &MismatchFunc); void addOneUnique(const CountSumOrPercent &UniqueFunc); @@ -768,7 +768,7 @@ struct InstrProfRecord { void clearValueData() { ValueData = nullptr; } /// Compute the sums of all counts and store in Sum. - void accumuateCounts(CountSumOrPercent &Sum) const; + void accumulateCounts(CountSumOrPercent &Sum) const; /// Compute the overlap b/w this IntrprofRecord and Other. void overlap(InstrProfRecord &Other, OverlapStats &Overlap, diff --git a/include/llvm/ProfileData/InstrProfReader.h b/include/llvm/ProfileData/InstrProfReader.h index 3eb84a835f9..f5f552672bf 100644 --- a/include/llvm/ProfileData/InstrProfReader.h +++ b/include/llvm/ProfileData/InstrProfReader.h @@ -92,7 +92,7 @@ public: virtual InstrProfSymtab &getSymtab() = 0; /// Compute the sum of counts and return in Sum. - void accumuateCounts(CountSumOrPercent &Sum, bool IsCS); + void accumulateCounts(CountSumOrPercent &Sum, bool IsCS); protected: std::unique_ptr Symtab; diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index 8cad6861b33..57d4fbc59f8 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/lib/ProfileData/InstrProf.cpp @@ -478,7 +478,7 @@ Error readPGOFuncNameStrings(StringRef NameStrings, InstrProfSymtab &Symtab) { return Error::success(); } -void InstrProfRecord::accumuateCounts(CountSumOrPercent &Sum) const { +void InstrProfRecord::accumulateCounts(CountSumOrPercent &Sum) const { uint64_t FuncSum = 0; Sum.NumEntries += Counts.size(); for (size_t F = 0, E = Counts.size(); F < E; ++F) @@ -552,7 +552,7 @@ void InstrProfRecord::overlap(InstrProfRecord &Other, OverlapStats &Overlap, uint64_t ValueCutoff) { // FuncLevel CountSum for other should already computed and nonzero. assert(FuncLevelOverlap.Test.CountSum >= 1.0f); - accumuateCounts(FuncLevelOverlap.Base); + accumulateCounts(FuncLevelOverlap.Base); bool Mismatch = (Counts.size() != Other.Counts.size()); // Check if the value profiles mismatch. @@ -1164,9 +1164,9 @@ void createProfileFileNameVar(Module &M, StringRef InstrProfileOutput) { } } -Error OverlapStats::accumuateCounts(const std::string &BaseFilename, - const std::string &TestFilename, - bool IsCS) { +Error OverlapStats::accumulateCounts(const std::string &BaseFilename, + const std::string &TestFilename, + bool IsCS) { auto getProfileSum = [IsCS](const std::string &Filename, CountSumOrPercent &Sum) -> Error { auto ReaderOrErr = InstrProfReader::create(Filename); @@ -1174,7 +1174,7 @@ Error OverlapStats::accumuateCounts(const std::string &BaseFilename, return E; } auto Reader = std::move(ReaderOrErr.get()); - Reader->accumuateCounts(Sum, IsCS); + Reader->accumulateCounts(Sum, IsCS); return Error::success(); }; auto Ret = getProfileSum(BaseFilename, Base); diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index 734ab85ba05..23d078a3dde 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -907,7 +907,7 @@ Error IndexedInstrProfReader::readNextRecord(NamedInstrProfRecord &Record) { return success(); } -void InstrProfReader::accumuateCounts(CountSumOrPercent &Sum, bool IsCS) { +void InstrProfReader::accumulateCounts(CountSumOrPercent &Sum, bool IsCS) { uint64_t NumFuncs = 0; for (const auto &Func : *this) { if (isIRLevelProfile()) { @@ -915,7 +915,7 @@ void InstrProfReader::accumuateCounts(CountSumOrPercent &Sum, bool IsCS) { if (FuncIsCS != IsCS) continue; } - Func.accumuateCounts(Sum); + Func.accumulateCounts(Sum); ++NumFuncs; } Sum.NumEntries = NumFuncs; diff --git a/lib/ProfileData/InstrProfWriter.cpp b/lib/ProfileData/InstrProfWriter.cpp index 4ca2defd26d..ccb270e0b71 100644 --- a/lib/ProfileData/InstrProfWriter.cpp +++ b/lib/ProfileData/InstrProfWriter.cpp @@ -193,7 +193,7 @@ void InstrProfWriter::overlapRecord(NamedInstrProfRecord &&Other, const OverlapFuncFilters &FuncFilter) { auto Name = Other.Name; auto Hash = Other.Hash; - Other.accumuateCounts(FuncLevelOverlap.Test); + Other.accumulateCounts(FuncLevelOverlap.Test); if (FunctionData.find(Name) == FunctionData.end()) { Overlap.addOneUnique(FuncLevelOverlap.Test); return; diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index 2b1205b950f..e311c1069f7 100644 --- a/tools/llvm-profdata/llvm-profdata.cpp +++ b/tools/llvm-profdata/llvm-profdata.cpp @@ -682,7 +682,7 @@ static void overlapInstrProfile(const std::string &BaseFilename, WriterContext Context(false, ErrorLock, WriterErrorCodes); WeightedFile WeightedInput{BaseFilename, 1}; OverlapStats Overlap; - Error E = Overlap.accumuateCounts(BaseFilename, TestFilename, IsCS); + Error E = Overlap.accumulateCounts(BaseFilename, TestFilename, IsCS); if (E) exitWithError(std::move(E), "Error in getting profile count sums"); if (Overlap.Base.CountSum < 1.0f) { -- 2.50.1