aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-03-21 17:22:35 +0000
committerDehao Chen <dehao@google.com>2017-03-21 17:22:35 +0000
commit190f17cae7eb660f424c9a01fdb7f0e199c56990 (patch)
treea1f4ea5c55e3059c485c8b66dde651a7f96513df /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parentca7818ebcab035d80b292b00f7f8c06249a8ef59 (diff)
downloadllvm-190f17cae7eb660f424c9a01fdb7f0e199c56990.zip
llvm-190f17cae7eb660f424c9a01fdb7f0e199c56990.tar.gz
llvm-190f17cae7eb660f424c9a01fdb7f0e199c56990.tar.bz2
Use ProfileSummary:getProfileCount to get ScaledCount for ModuleSummary
Summary: ModuleSummary should use the standard interface of ProfileSummary::getProfileCount. Reviewers: eraman, tejohnson Reviewed By: tejohnson Subscribers: tejohnson, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D31154 llvm-svn: 298404
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index 87b6c0d..2a54f03 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -231,7 +231,7 @@ computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M,
}
// We should have named any anonymous globals
assert(CalledFunction->hasName());
- auto ScaledCount = BFI ? BFI->getBlockProfileCount(&BB) : None;
+ auto ScaledCount = ProfileSummaryInfo::getProfileCount(&I, BFI);
auto Hotness = ScaledCount ? getHotness(ScaledCount.getValue(), PSI)
: CalleeInfo::HotnessType::Unknown;