diff options
author | Easwaran Raman <eraman@google.com> | 2017-05-16 20:14:39 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2017-05-16 20:14:39 +0000 |
commit | dadc0f11ad99841f6b205bf798497ee32adf7ec6 (patch) | |
tree | 3a8f312d50f9b57f72c90332236a70aa3e491a8a /llvm/lib/Analysis/ProfileSummaryInfo.cpp | |
parent | 6b6ce6350fbe16a260d58e6fcaf6dffc3c053f8a (diff) | |
download | bcm5719-llvm-dadc0f11ad99841f6b205bf798497ee32adf7ec6.tar.gz bcm5719-llvm-dadc0f11ad99841f6b205bf798497ee32adf7ec6.zip |
Add hasProfileSummary and has{Sample|Instrumentation}Profile methods
ProfileSummaryInfo already checks whether the module has sample profile
in determining profile counts. This will also be useful in inliner to
clean up threshold updates.
llvm-svn: 303204
Diffstat (limited to 'llvm/lib/Analysis/ProfileSummaryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/ProfileSummaryInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp index 502f4205b68..12b86daa602 100644 --- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp +++ b/llvm/lib/Analysis/ProfileSummaryInfo.cpp @@ -75,7 +75,7 @@ ProfileSummaryInfo::getProfileCount(const Instruction *Inst, return None; assert((isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) && "We can only get profile count for call/invoke instruction."); - if (computeSummary() && Summary->getKind() == ProfileSummary::PSK_Sample) { + if (hasSampleProfile()) { // In sample PGO mode, check if there is a profile metadata on the // instruction. If it is present, determine hotness solely based on that, // since the sampled entry count may not be accurate. |