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;
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"))
648 Threshold += *AttrCallThresholdBonus;
682 // Pretend to inline the function, with a custom threshold.
693 // threshold to get the bonus we want to apply, but don't go below zero.
771 // Take off the bonus we applied to the threshold.
772 Threshold -= SingleBBBonus;
783 InstructionCostDetailMap[I].ThresholdBefore = Threshold;
787 // This function is called to find new values of cost and threshold after
792 InstructionCostDetailMap[I].ThresholdAfter = Threshold;
873 if (Threshold == 0)
937 // savings threshold.
964 APInt Threshold(128, PSI->getOrCompHotCountThreshold());
965 Threshold *= Size;
969 if (UpperBoundCycleSavings.uge(Threshold))
975 if (LowerBoundCycleSavings.ult(Threshold))
1003 // subtract the excess bonus, if any, from the Threshold before
1006 Threshold -= VectorBonus;
1008 Threshold -= VectorBonus / 2;
1020 getStringFnAttrAsInt(CandidateCall, "function-inline-threshold"))
1021 Threshold = *AttrThreshold;
1028 return InlineResult::failure("Cost over threshold.");
1035 return Cost < std::max(1, Threshold)
1037 : InlineResult::failure("Cost over threshold.");
1043 // Bail out the moment we cross the threshold. This means we'll under-count
1045 if (Cost < Threshold)
1056 // Perform some tweaks to the cost and threshold based on the direct
1060 // threshold, and we'll lower it if the % of vector instructions gets too
1069 // Update the threshold based on callsite properties
1072 // While Threshold depends on commandline options that can take negative
1073 // values, we want to enforce the invariant that the computed threshold and
1075 assert(Threshold >= 0);
1079 // Speculatively apply all possible bonuses to Threshold. If cost exceeds
1080 // this Threshold any time, and cost cannot decrease, we can stop processing
1082 Threshold += (SingleBBBonus + VectorBonus);
1096 if (Cost >= Threshold && !ComputeFullInlineCost)
1115 Params(Params), Threshold(Params.DefaultThreshold),
1138 int getThreshold() const { return Threshold; }
1170 int Threshold = 5;
1287 Threshold -= SingleBBBonus;
1312 Threshold -= VectorBonus;
1314 Threshold -= VectorBonus / 2;
1316 set(InlineCostFeatureIndex::threshold, Threshold);
1342 Threshold += TTI.adjustInliningThreshold(&CandidateCall);
1343 Threshold *= TTI.getInliningThresholdMultiplier();
1344 SingleBBBonus = Threshold * SingleBBBonusPercent / 100;
1345 VectorBonus = Threshold * VectorBonusPercent / 100;
1346 Threshold += (SingleBBBonus + VectorBonus);
1379 // The threshold delta is printed only when it is non-zero. It happens
1387 << ", threshold before = " << Record->ThresholdBefore
1388 << ", threshold after = " << Record->ThresholdAfter << ", ";
1391 OS << ", threshold delta = " << Record->getThresholdDelta();
1475 // a threshold.
1476 // FIXME: If the threshold is removed or lowered too much, we could end up
1849 // general threshold adjusting heuristics in updateThreshold().
1892 // threshold.
1912 // If no size growth is allowed for this inlining, set Threshold to 0.
1914 Threshold = 0;
1930 // Various bonus percentages. These are multiplied by Threshold to get the
1954 // and reduce the threshold if the caller has the necessary attribute.
1956 Threshold = MinIfValid(Threshold, Params.OptMinSizeThreshold);
1964 Threshold = MinIfValid(Threshold, Params.OptSizeThreshold);
1966 // Adjust the threshold based on inlinehint attribute and profile based
1970 Threshold = MaxIfValid(Threshold, Params.HintThreshold);
1983 // FIXME: This should update the threshold only if it exceeds the
1984 // current threshold, but AutoFDO + ThinLTO currently relies on this
1987 Threshold = *HotCallSiteThreshold;
1995 Threshold = MinIfValid(Threshold, Params.ColdCallSiteThreshold);
2002 // that the callee is hot and treat it as a weaker hint for threshold
2004 Threshold = MaxIfValid(Threshold, Params.HintThreshold);
2012 Threshold = MinIfValid(Threshold, Params.ColdThreshold);
2017 Threshold += TTI.adjustInliningThreshold(&Call);
2019 // Finally, take the target-specific inlining threshold multiplier into
2021 Threshold *= TTI.getInliningThresholdMultiplier();
2023 SingleBBBonus = Threshold * SingleBBBonusPercent / 100;
2024 VectorBonus = Threshold * VectorBonusPercent / 100;
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.
2792 // Analyze the cost of this block. If we blow through the threshold, this
2840 // If the callee's stack size exceeds the user-specified threshold,
2870 DEBUG_PRINT_STAT(Threshold);
3079 // We use always/never here since threshold is not meaningful,
3158 InlineParams llvm::getInlineParams(int Threshold) {
3161 // This field is the threshold to use for a callee by default. This is
3165 // * the -inline-threshold flag.
3166 // If the -inline-threshold flag is explicitly specified, that is used
3171 Params.DefaultThreshold = Threshold;
3173 // Set the HintThreshold knob from the -inlinehint-threshold.
3176 // Set the HotCallSiteThreshold knob from the -hot-callsite-threshold.
3179 // If the -locally-hot-callsite-threshold is explicitly specified, use it to
3181 // Params.LocallyHotCallSiteThreshold from -locally-hot-callsite-threshold if
3190 // -inline-cold-callsite-threshold.
3194 // -inlinehint-threshold commandline option is not explicitly given. If that
3197 // If the -inline-threshold is not specified, set the ColdThreshold from the
3198 // -inlinecold-threshold even if it is not explicitly passed. If
3199 // -inline-threshold is specified, then -inlinecold-threshold needs to be
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