From: Sean Silva Date: Thu, 5 May 2016 19:54:13 +0000 (+0000) Subject: Add a note about the "entry count" used the profile summary X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4c22d2f8d89b147c625e3664a7eee6c8bc3ab29;p=llvm Add a note about the "entry count" used the profile summary Thanks to David Li for the clarification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268669 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ProfileData/ProfileSummary.cpp b/lib/ProfileData/ProfileSummary.cpp index 33c1479e19c..dfe44e32bbe 100644 --- a/lib/ProfileData/ProfileSummary.cpp +++ b/lib/ProfileData/ProfileSummary.cpp @@ -33,6 +33,10 @@ const std::vector 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]);