summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/ProfileData/ProfileSummary.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp
index 33c1479e19c..dfe44e32bbe 100644
--- a/llvm/lib/ProfileData/ProfileSummary.cpp
+++ b/llvm/lib/ProfileData/ProfileSummary.cpp
@@ -33,6 +33,10 @@ const std::vector<uint32_t> ProfileSummary::DefaultCutoffs(
const char *ProfileSummary::KindStr[2] = {"InstrProf", "SampleProfile"};
void InstrProfSummary::addRecord(const InstrProfRecord &R) {
+ // The first counter is not necessarily an entry count for IR
+ // instrumentation profiles.
+ // Eventually MaxFunctionCount will become obsolete and this can be
+ // removed.
addEntryCount(R.Counts[0]);
for (size_t I = 1, E = R.Counts.size(); I < E; ++I)
addInternalCount(R.Counts[I]);
OpenPOWER on IntegriCloud