summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEaswaran Raman <eraman@google.com>2016-03-28 23:14:29 +0000
committerEaswaran Raman <eraman@google.com>2016-03-28 23:14:29 +0000
commit6f4903d985e7829fa6208a469f78086d2e6ab280 (patch)
tree9f4804757fd8174802122912a3a7e7353d6202af /llvm/lib
parentd133f6acf14ab84e364baa55ebe3aafecd0451d0 (diff)
downloadbcm5719-llvm-6f4903d985e7829fa6208a469f78086d2e6ab280.tar.gz
bcm5719-llvm-6f4903d985e7829fa6208a469f78086d2e6ab280.zip
Sample profile summary cleanup
Replace references to MaxHeadSamples with MaxFunctionCount Differential Revision: http://reviews.llvm.org/D18522 llvm-svn: 264686
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ProfileData/ProfileSummary.cpp12
-rw-r--r--llvm/lib/ProfileData/SampleProfWriter.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp
index b93bc2fc9d2..33c1479e19c 100644
--- a/llvm/lib/ProfileData/ProfileSummary.cpp
+++ b/llvm/lib/ProfileData/ProfileSummary.cpp
@@ -214,7 +214,7 @@ SampleProfileSummary::getFormatSpecificMD(LLVMContext &Context) {
Components.push_back(
getKeyValMD(Context, "MaxSamplesPerLine", getMaxSamplesPerLine()));
Components.push_back(
- getKeyValMD(Context, "MaxHeadSamples", getMaxHeadSamples()));
+ getKeyValMD(Context, "MaxFunctionCount", getMaxFunctionCount()));
Components.push_back(
getKeyValMD(Context, "NumLinesWithSamples", getNumLinesWithSamples()));
Components.push_back(getKeyValMD(Context, "NumFunctions", NumFunctions));
@@ -318,8 +318,8 @@ static ProfileSummary *getInstrProfSummaryFromMD(MDTuple *Tuple) {
// Parse an MDTuple representing a SampleProfileSummary object.
static ProfileSummary *getSampleProfileSummaryFromMD(MDTuple *Tuple) {
- uint64_t TotalSamples, MaxSamplesPerLine, MaxHeadSamples, NumLinesWithSamples,
- NumFunctions;
+ uint64_t TotalSamples, MaxSamplesPerLine, MaxFunctionCount,
+ NumLinesWithSamples, NumFunctions;
SummaryEntryVector Summary;
if (Tuple->getNumOperands() != 7)
@@ -332,8 +332,8 @@ static ProfileSummary *getSampleProfileSummaryFromMD(MDTuple *Tuple) {
if (!getVal(dyn_cast<MDTuple>(Tuple->getOperand(2)), "MaxSamplesPerLine",
MaxSamplesPerLine))
return nullptr;
- if (!getVal(dyn_cast<MDTuple>(Tuple->getOperand(3)), "MaxHeadSamples",
- MaxHeadSamples))
+ if (!getVal(dyn_cast<MDTuple>(Tuple->getOperand(3)), "MaxFunctionCount",
+ MaxFunctionCount))
return nullptr;
if (!getVal(dyn_cast<MDTuple>(Tuple->getOperand(4)), "NumLinesWithSamples",
NumLinesWithSamples))
@@ -344,7 +344,7 @@ static ProfileSummary *getSampleProfileSummaryFromMD(MDTuple *Tuple) {
if (!getSummaryFromMD(dyn_cast<MDTuple>(Tuple->getOperand(6)), Summary))
return nullptr;
return new SampleProfileSummary(TotalSamples, MaxSamplesPerLine,
- MaxHeadSamples, NumLinesWithSamples,
+ MaxFunctionCount, NumLinesWithSamples,
NumFunctions, Summary);
}
diff --git a/llvm/lib/ProfileData/SampleProfWriter.cpp b/llvm/lib/ProfileData/SampleProfWriter.cpp
index 2acb538e290..2f6490224c5 100644
--- a/llvm/lib/ProfileData/SampleProfWriter.cpp
+++ b/llvm/lib/ProfileData/SampleProfWriter.cpp
@@ -140,7 +140,7 @@ std::error_code SampleProfileWriterBinary::writeSummary() {
auto &OS = *OutputStream;
encodeULEB128(Summary->getTotalSamples(), OS);
encodeULEB128(Summary->getMaxSamplesPerLine(), OS);
- encodeULEB128(Summary->getMaxHeadSamples(), OS);
+ encodeULEB128(Summary->getMaxFunctionCount(), OS);
encodeULEB128(Summary->getNumLinesWithSamples(), OS);
encodeULEB128(Summary->getNumFunctions(), OS);
std::vector<ProfileSummaryEntry> &Entries = Summary->getDetailedSummary();
OpenPOWER on IntegriCloud