diff options
author | Xinliang David Li <davidxl@google.com> | 2019-04-24 19:51:16 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2019-04-24 19:51:16 +0000 |
commit | 499c80b89015cf0fa744b228518b5f6632e8c989 (patch) | |
tree | d246a3dcdc237c1f2bb26567f1d64627a6f2fa1d /llvm/lib/Analysis/ProfileSummaryInfo.cpp | |
parent | d129ee34a51e44c9d46a1bf646a12dbf9b438996 (diff) | |
download | bcm5719-llvm-499c80b89015cf0fa744b228518b5f6632e8c989.tar.gz bcm5719-llvm-499c80b89015cf0fa744b228518b5f6632e8c989.zip |
Add optional arg to profile count getters to filter
synthetic profile count.
Differential Revision: http://reviews.llvm.org/D61025
llvm-svn: 359131
Diffstat (limited to 'llvm/lib/Analysis/ProfileSummaryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/ProfileSummaryInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp index 1f9e9813c76..682f15d054d 100644 --- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp +++ b/llvm/lib/Analysis/ProfileSummaryInfo.cpp @@ -95,7 +95,8 @@ bool ProfileSummaryInfo::computeSummary() { Optional<uint64_t> ProfileSummaryInfo::getProfileCount(const Instruction *Inst, - BlockFrequencyInfo *BFI) { + BlockFrequencyInfo *BFI, + bool AllowSynthetic) { if (!Inst) return None; assert((isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) && @@ -111,7 +112,7 @@ ProfileSummaryInfo::getProfileCount(const Instruction *Inst, return None; } if (BFI) - return BFI->getBlockProfileCount(Inst->getParent()); + return BFI->getBlockProfileCount(Inst->getParent(), AllowSynthetic); return None; } |