Lines Matching full:threshold

57     DefaultThreshold("inlinedefault-threshold", cl::Hidden, cl::init(225),
75 "inline-threshold", cl::Hidden, cl::init(225),
79 "inlinehint-threshold", cl::Hidden, cl::init(325),
80 cl::desc("Threshold for inlining functions with inline hint"));
83 ColdCallSiteThreshold("inline-cold-callsite-threshold", cl::Hidden,
85 cl::desc("Threshold for inlining cold callsites"));
111 // We introduce this threshold to help performance of instrumentation based
115 "inlinecold-threshold", cl::Hidden, cl::init(45),
116 cl::desc("Threshold for inlining functions with cold attribute"));
119 HotCallSiteThreshold("hot-callsite-threshold", cl::Hidden, cl::init(3000),
120 cl::desc("Threshold for hot callsites "));
123 "locally-hot-callsite-threshold", cl::Hidden, cl::init(525),
124 cl::desc("Threshold for locally hot callsites "));
165 "exceeds the threshold."));
557 // This DenseMap stores the delta change in cost and threshold after
564 int Threshold = 0; member in __anon463f3bdb0111::InlineCostCallAnalyzer
572 /// Ignore the threshold when finalizing analysis.
593 // Whether inlining is decided by cost-threshold analysis.
615 /// Update Threshold based on callsite properties such as callee
620 /// Return a higher threshold if \p Call is a hot callsite.
647 getStringFnAttrAsInt(Call, "call-threshold-bonus")) in onCallBaseVisitStart()
648 Threshold += *AttrCallThresholdBonus; in onCallBaseVisitStart()
682 // Pretend to inline the function, with a custom threshold. in onLoweredCall()
693 // threshold to get the bonus we want to apply, but don't go below zero. in onLoweredCall()
771 // Take off the bonus we applied to the threshold. in onBlockAnalyzed()
772 Threshold -= SingleBBBonus; in onBlockAnalyzed()
783 InstructionCostDetailMap[I].ThresholdBefore = Threshold; in onInstructionAnalysisStart()
787 // This function is called to find new values of cost and threshold after in onInstructionAnalysisFinish()
792 InstructionCostDetailMap[I].ThresholdAfter = Threshold; in onInstructionAnalysisFinish()
873 if (Threshold == 0) in costBenefitAnalysis()
937 // savings threshold. in costBenefitAnalysis()
964 APInt Threshold(128, PSI->getOrCompHotCountThreshold()); in costBenefitAnalysis() local
965 Threshold *= Size; in costBenefitAnalysis()
969 if (UpperBoundCycleSavings.uge(Threshold)) in costBenefitAnalysis()
975 if (LowerBoundCycleSavings.ult(Threshold)) in costBenefitAnalysis()
1003 // subtract the excess bonus, if any, from the Threshold before in finalizeAnalysis()
1006 Threshold -= VectorBonus; in finalizeAnalysis()
1008 Threshold -= VectorBonus / 2; in finalizeAnalysis()
1020 getStringFnAttrAsInt(CandidateCall, "function-inline-threshold")) in finalizeAnalysis()
1021 Threshold = *AttrThreshold; in finalizeAnalysis()
1028 return InlineResult::failure("Cost over threshold."); in finalizeAnalysis()
1035 return Cost < std::max(1, Threshold) in finalizeAnalysis()
1037 : InlineResult::failure("Cost over threshold."); in finalizeAnalysis()
1043 // Bail out the moment we cross the threshold. This means we'll under-count in shouldStop()
1045 if (Cost < Threshold) in shouldStop()
1056 // Perform some tweaks to the cost and threshold based on the direct in onAnalysisStart()
1060 // threshold, and we'll lower it if the % of vector instructions gets too in onAnalysisStart()
1069 // Update the threshold based on callsite properties in onAnalysisStart()
1072 // While Threshold depends on commandline options that can take negative in onAnalysisStart()
1073 // values, we want to enforce the invariant that the computed threshold and in onAnalysisStart()
1075 assert(Threshold >= 0); in onAnalysisStart()
1079 // Speculatively apply all possible bonuses to Threshold. If cost exceeds in onAnalysisStart()
1080 // this Threshold any time, and cost cannot decrease, we can stop processing in onAnalysisStart()
1082 Threshold += (SingleBBBonus + VectorBonus); in onAnalysisStart()
1096 if (Cost >= Threshold && !ComputeFullInlineCost) in onAnalysisStart()
1115 Params(Params), Threshold(Params.DefaultThreshold), in InlineCostCallAnalyzer()
1138 int getThreshold() const { return Threshold; } in getThreshold()
1170 int Threshold = 5; member in __anon463f3bdb0111::InlineCostFeaturesAnalyzer
1287 Threshold -= SingleBBBonus; in onBlockAnalyzed()
1312 Threshold -= VectorBonus; in finalizeAnalysis()
1314 Threshold -= VectorBonus / 2; in finalizeAnalysis()
1316 set(InlineCostFeatureIndex::threshold, Threshold); in finalizeAnalysis()
1342 Threshold += TTI.adjustInliningThreshold(&CandidateCall); in onAnalysisStart()
1343 Threshold *= TTI.getInliningThresholdMultiplier(); in onAnalysisStart()
1344 SingleBBBonus = Threshold * SingleBBBonusPercent / 100; in onAnalysisStart()
1345 VectorBonus = Threshold * VectorBonusPercent / 100; in onAnalysisStart()
1346 Threshold += (SingleBBBonus + VectorBonus); in onAnalysisStart()
1379 // The threshold delta is printed only when it is non-zero. It happens in emitInstructionAnnot()
1387 << ", threshold before = " << Record->ThresholdBefore in emitInstructionAnnot()
1388 << ", threshold after = " << Record->ThresholdAfter << ", "; in emitInstructionAnnot()
1391 OS << ", threshold delta = " << Record->getThresholdDelta(); in emitInstructionAnnot()
1475 // a threshold. in visitAlloca()
1476 // FIXME: If the threshold is removed or lowered too much, we could end up in visitAlloca()
1849 // general threshold adjusting heuristics in updateThreshold(). in allowSizeGrowth()
1892 // threshold. in getHotCallSiteThreshold()
1912 // If no size growth is allowed for this inlining, set Threshold to 0. in updateThreshold()
1914 Threshold = 0; in updateThreshold()
1930 // Various bonus percentages. These are multiplied by Threshold to get the in updateThreshold()
1954 // and reduce the threshold if the caller has the necessary attribute. in updateThreshold()
1956 Threshold = MinIfValid(Threshold, Params.OptMinSizeThreshold); in updateThreshold()
1964 Threshold = MinIfValid(Threshold, Params.OptSizeThreshold); in updateThreshold()
1966 // Adjust the threshold based on inlinehint attribute and profile based in updateThreshold()
1970 Threshold = MaxIfValid(Threshold, Params.HintThreshold); in updateThreshold()
1983 // FIXME: This should update the threshold only if it exceeds the in updateThreshold()
1984 // current threshold, but AutoFDO + ThinLTO currently relies on this in updateThreshold()
1987 Threshold = *HotCallSiteThreshold; in updateThreshold()
1995 Threshold = MinIfValid(Threshold, Params.ColdCallSiteThreshold); in updateThreshold()
2002 // that the callee is hot and treat it as a weaker hint for threshold in updateThreshold()
2004 Threshold = MaxIfValid(Threshold, Params.HintThreshold); in updateThreshold()
2012 Threshold = MinIfValid(Threshold, Params.ColdThreshold); in updateThreshold()
2017 Threshold += TTI.adjustInliningThreshold(&Call); in updateThreshold()
2019 // Finally, take the target-specific inlining threshold multiplier into in updateThreshold()
2021 Threshold *= TTI.getInliningThresholdMultiplier(); in updateThreshold()
2023 SingleBBBonus = Threshold * SingleBBBonusPercent / 100; in updateThreshold()
2024 VectorBonus = Threshold * VectorBonusPercent / 100; in updateThreshold()
2533 /// aborts early if the threshold has been exceeded or an impossible to inline
2702 /// viable. It computes the cost and adjusts the threshold based on numerous
2704 /// is below the computed threshold, then inlining was forcibly disabled by
2763 // crossing our threshold, we use a small-size optimized SetVector. in analyze()
2792 // Analyze the cost of this block. If we blow through the threshold, this in analyze()
2840 // If the callee's stack size exceeds the user-specified threshold, in analyze()
2870 DEBUG_PRINT_STAT(Threshold); in print()
3079 // We use always/never here since threshold is not meaningful, in getInlineCost()
3158 InlineParams llvm::getInlineParams(int Threshold) { in getInlineParams() argument
3161 // This field is the threshold to use for a callee by default. This is in getInlineParams()
3165 // * the -inline-threshold flag. in getInlineParams()
3166 // If the -inline-threshold flag is explicitly specified, that is used in getInlineParams()
3171 Params.DefaultThreshold = Threshold; in getInlineParams()
3173 // Set the HintThreshold knob from the -inlinehint-threshold. in getInlineParams()
3176 // Set the HotCallSiteThreshold knob from the -hot-callsite-threshold. in getInlineParams()
3179 // If the -locally-hot-callsite-threshold is explicitly specified, use it to in getInlineParams()
3181 // Params.LocallyHotCallSiteThreshold from -locally-hot-callsite-threshold if in getInlineParams()
3190 // -inline-cold-callsite-threshold. in getInlineParams()
3194 // -inlinehint-threshold commandline option is not explicitly given. If that in getInlineParams()
3197 // If the -inline-threshold is not specified, set the ColdThreshold from the in getInlineParams()
3198 // -inlinecold-threshold even if it is not explicitly passed. If in getInlineParams()
3199 // -inline-threshold is specified, then -inlinecold-threshold needs to be in getInlineParams()
3215 // Compute the default threshold for inlining based on the opt level and the
3231 // At O3, use the value of -locally-hot-callsite-threshold option to populate in getInlineParams()