aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/SampleProfile.cpp
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2015-11-23 15:24:13 +0000
committerDiego Novillo <dnovillo@google.com>2015-11-23 15:24:13 +0000
commit39ab68f39b9bb96b6fd5ba8a89232f221c3b1ba6 (patch)
tree5548d0e14d59ce2548a1753584692e06d329d707 /llvm/lib/Transforms/IPO/SampleProfile.cpp
parent29d23f9f4c1cdfdd9c2912b724ed16f648c99680 (diff)
downloadllvm-39ab68f39b9bb96b6fd5ba8a89232f221c3b1ba6.zip
llvm-39ab68f39b9bb96b6fd5ba8a89232f221c3b1ba6.tar.gz
llvm-39ab68f39b9bb96b6fd5ba8a89232f221c3b1ba6.tar.bz2
SamplePGO - Use newly introduced local variable. NFC.
llvm-svn: 253868
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 816fc93..20bfac9 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -236,7 +236,7 @@ SampleCoverageTracker::countUsedSamples(const FunctionSamples *Samples) const {
for (const auto &I : Samples->getCallsiteSamples()) {
const FunctionSamples *CalleeSamples = &I.second;
if (CalleeSamples->getTotalSamples() > 0)
- Count += countUsedSamples(&I.second);
+ Count += countUsedSamples(CalleeSamples);
}
return Count;
@@ -255,7 +255,7 @@ SampleCoverageTracker::countBodySamples(const FunctionSamples *Samples) const {
for (const auto &I : Samples->getCallsiteSamples()) {
const FunctionSamples *CalleeSamples = &I.second;
if (CalleeSamples->getTotalSamples() > 0)
- Count += countBodySamples(&I.second);
+ Count += countBodySamples(CalleeSamples);
}
return Count;