[llvm] r268669 - Add a note about the "entry count" used the profile summary
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 12:54:13 PDT 2016
Author: silvas
Date: Thu May 5 14:54:13 2016
New Revision: 268669
URL: http://llvm.org/viewvc/llvm-project?rev=268669&view=rev
Log:
Add a note about the "entry count" used the profile summary
Thanks to David Li for the clarification.
Modified:
llvm/trunk/lib/ProfileData/ProfileSummary.cpp
Modified: llvm/trunk/lib/ProfileData/ProfileSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/ProfileSummary.cpp?rev=268669&r1=268668&r2=268669&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/ProfileSummary.cpp (original)
+++ llvm/trunk/lib/ProfileData/ProfileSummary.cpp Thu May 5 14:54:13 2016
@@ -33,6 +33,10 @@ const std::vector<uint32_t> ProfileSumma
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]);
More information about the llvm-commits
mailing list