summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/ProfileSummary.cpp
diff options
context:
space:
mode:
authorSean Silva <chisophugis@gmail.com>2016-05-05 19:54:13 +0000
committerSean Silva <chisophugis@gmail.com>2016-05-05 19:54:13 +0000
commitdaa902a4b988912a96ea7646cac8da77898f5ef2 (patch)
treee04e86a366748270be6755c33f44e9404e964fe9 /llvm/lib/ProfileData/ProfileSummary.cpp
parent66434562e7cdb4671821cbe50ec8c15fe5fff078 (diff)
downloadbcm5719-llvm-daa902a4b988912a96ea7646cac8da77898f5ef2.tar.gz
bcm5719-llvm-daa902a4b988912a96ea7646cac8da77898f5ef2.zip
Add a note about the "entry count" used the profile summary
Thanks to David Li for the clarification. llvm-svn: 268669
Diffstat (limited to 'llvm/lib/ProfileData/ProfileSummary.cpp')
-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