diff options
| author | Easwaran Raman <eraman@google.com> | 2016-03-28 18:58:05 +0000 |
|---|---|---|
| committer | Easwaran Raman <eraman@google.com> | 2016-03-28 18:58:05 +0000 |
| commit | 8f6b9efc36401e7c62cbcf8f09eede892aa117f5 (patch) | |
| tree | d4f0e92727f44d0045706f722ae4068c9bc1c634 /llvm/lib/ProfileData | |
| parent | d9f635674ad28884ce828fa332fa5f03f71caddf (diff) | |
| download | bcm5719-llvm-8f6b9efc36401e7c62cbcf8f09eede892aa117f5.tar.gz bcm5719-llvm-8f6b9efc36401e7c62cbcf8f09eede892aa117f5.zip | |
Profile summary cleanup.
Differential Revision: http://reviews.llvm.org/D18468
llvm-svn: 264619
Diffstat (limited to 'llvm/lib/ProfileData')
| -rw-r--r-- | llvm/lib/ProfileData/ProfileSummary.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp index 82546eb47d4..b93bc2fc9d2 100644 --- a/llvm/lib/ProfileData/ProfileSummary.cpp +++ b/llvm/lib/ProfileData/ProfileSummary.cpp @@ -42,8 +42,8 @@ void InstrProfSummary::addRecord(const InstrProfRecord &R) { // equivalent to a block with a count in the instrumented profile. void SampleProfileSummary::addRecord(const sampleprof::FunctionSamples &FS) { NumFunctions++; - if (FS.getHeadSamples() > MaxHeadSamples) - MaxHeadSamples = FS.getHeadSamples(); + if (FS.getHeadSamples() > MaxFunctionCount) + MaxFunctionCount = FS.getHeadSamples(); for (const auto &I : FS.getBodySamples()) addCount(I.second.getSamples()); } @@ -103,13 +103,13 @@ bool ProfileSummary::isFunctionUnlikely(const Function *F) { InstrProfSummary::InstrProfSummary(const IndexedInstrProf::Summary &S) : ProfileSummary(PSK_Instr), MaxInternalBlockCount( - S.get(IndexedInstrProf::Summary::MaxInternalBlockCount)), - MaxFunctionCount(S.get(IndexedInstrProf::Summary::MaxFunctionCount)), - NumFunctions(S.get(IndexedInstrProf::Summary::TotalNumFunctions)) { + S.get(IndexedInstrProf::Summary::MaxInternalBlockCount)) { TotalCount = S.get(IndexedInstrProf::Summary::TotalBlockCount); MaxCount = S.get(IndexedInstrProf::Summary::MaxBlockCount); + MaxFunctionCount = S.get(IndexedInstrProf::Summary::MaxFunctionCount); NumCounts = S.get(IndexedInstrProf::Summary::TotalNumBlocks); + NumFunctions = S.get(IndexedInstrProf::Summary::TotalNumFunctions); for (unsigned I = 0; I < S.NumCutoffEntries; I++) { const IndexedInstrProf::Summary::Entry &Ent = S.getEntry(I); @@ -117,6 +117,7 @@ InstrProfSummary::InstrProfSummary(const IndexedInstrProf::Summary &S) Ent.NumBlocks); } } + void InstrProfSummary::addEntryCount(uint64_t Count) { addCount(Count); NumFunctions++; |

