summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp')
-rw-r--r--llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
index f0b9ea6f553..0db6dd04a7e 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
@@ -557,14 +557,17 @@ BlockFrequencyInfoImplBase::getBlockFreq(const BlockNode &Node) const {
Optional<uint64_t>
BlockFrequencyInfoImplBase::getBlockProfileCount(const Function &F,
- const BlockNode &Node) const {
- return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency());
+ const BlockNode &Node,
+ bool AllowSynthetic) const {
+ return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency(),
+ AllowSynthetic);
}
Optional<uint64_t>
BlockFrequencyInfoImplBase::getProfileCountFromFreq(const Function &F,
- uint64_t Freq) const {
- auto EntryCount = F.getEntryCount();
+ uint64_t Freq,
+ bool AllowSynthetic) const {
+ auto EntryCount = F.getEntryCount(AllowSynthetic);
if (!EntryCount)
return None;
// Use 128 bit APInt to do the arithmetic to avoid overflow.
OpenPOWER on IntegriCloud