Lines Matching +full:no +full:- +full:reset +full:- +full:on +full:- +full:init

1 //===- ProfileSummaryInfo.cpp - Global profile summary information --------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
27 "partial-profile", cl::Hidden, cl::init(false),
31 "scale-partial-sample-profile-working-set-size", cl::Hidden, cl::init(true),
38 "partial-sample-profile-working-set-size-scale-factor", cl::Hidden,
39 cl::init(0.008),
54 auto *SummaryMD = M->getProfileSummary(/* IsCS */ true); in refresh()
56 Summary.reset(ProfileSummary::getFromMD(SummaryMD)); in refresh()
60 SummaryMD = M->getProfileSummary(/* IsCS */ false); in refresh()
62 Summary.reset(ProfileSummary::getFromMD(SummaryMD)); in refresh()
74 // In sample PGO mode, check if there is a profile metadata on the in getProfileCount()
75 // instruction. If it is present, determine hotness solely based on that, in getProfileCount()
76 // since the sampled entry count may not be accurate. If there is no in getProfileCount()
77 // annotated on the instruction, return std::nullopt. in getProfileCount()
84 return BFI->getBlockProfileCount(Call.getParent(), AllowSynthetic); in getProfileCount()
95 /// example, no profile data is available).
99 if (F->hasFnAttribute(Attribute::Cold)) in isFunctionEntryCold()
103 auto FunctionCount = F->getEntryCount(); in isFunctionEntryCold()
104 // FIXME: The heuristic used below for determining coldness is based on in isFunctionEntryCold()
107 return FunctionCount && isColdCount(FunctionCount->getCount()); in isFunctionEntryCold()
112 auto &DetailedSummary = Summary->getDetailedSummary(); in computeThresholds()
129 double PartialProfileRatio = Summary->getPartialProfileRatio(); in computeThresholds()
146 return iter->second; in computeThreshold()
148 auto &DetailedSummary = Summary->getDetailedSummary(); in computeThreshold()
212 // In SamplePGO, if the caller has been sampled, and there is no profile in isColdCallSite()
213 // annotated on the callsite, we consider the callsite as cold. in isColdCallSite()
214 return hasSampleProfile() && CB.getCaller()->hasProfileData(); in isColdCallSite()
219 Summary->getKind() == ProfileSummary::PSK_Sample && in hasPartialSampleProfile()
220 (PartialProfile || Summary->isPartialProfile()); in hasPartialSampleProfile()
223 INITIALIZE_PASS(ProfileSummaryInfoWrapperPass, "profile-summary-info",
232 PSI.reset(new ProfileSummaryInfo(M)); in doInitialization()
237 PSI.reset(); in doFinalization()