Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Threshold

42     UnrollThreshold("unroll-threshold", cl::init(150), cl::Hidden,
43 cl::desc("The baseline cost threshold for loop unrolling"));
46 "unroll-percent-dynamic-cost-saved-threshold", cl::init(20), cl::Hidden,
48 "unrolling to allow unrolling up to the max threshold."));
54 "the '-unroll-perecent-dynamic-cost-saved-threshold' flag)."));
69 "-unroll-threshold loop size is reached."));
76 PragmaUnrollThreshold("pragma-unroll-threshold", cl::init(16 * 1024), cl::Hidden,
106 /// A magic value for use with the Threshold parameter to indicate
111 // Threshold to use when optsize is specified (and there is no
112 // explicit -unroll-threshold).
163 UP.Threshold = CurrentThreshold;
188 // Select threshold values used to limit unrolling based on a
189 // total unrolled size. Parameters Threshold and PartialThreshold
194 unsigned &Threshold, unsigned &PartialThreshold,
197 // Determine the current unrolling threshold. While this is
200 // optimize-for-size, and the unroll threshold was not user
202 Threshold = UserThreshold ? CurrentThreshold : UP.Threshold;
216 Threshold = UP.OptSizeThreshold;
224 if (Threshold != NoThreshold)
225 Threshold = std::max<unsigned>(Threshold, PragmaUnrollThreshold);
231 bool canUnrollCompletely(Loop *L, unsigned Threshold,
249 Pass *llvm::createLoopUnrollPass(int Threshold, int Count, int AllowPartial,
251 return new LoopUnroll(Threshold, Count, AllowPartial, Runtime);
623 DEBUG(dbgs() << " Exceeded threshold.. exiting.\n"
796 bool LoopUnroll::canUnrollCompletely(Loop *L, unsigned Threshold,
802 if (Threshold == NoThreshold) {
803 DEBUG(dbgs() << " Can fully unroll, because no threshold is set.\n");
807 if (UnrolledCost <= Threshold) {
809 << UnrolledCost << "<" << Threshold << "\n");
819 // dynamic cost of the loop, we use a higher threshold to allow more
826 (int64_t)Threshold) {
829 << "% (threshold: " << PercentDynamicCostSavedThreshold
832 << ") is less than the max threshold ("
838 DEBUG(dbgs() << " Threshold: " << Threshold << "\n");
839 DEBUG(dbgs() << " Max threshold: " << DynamicCostSavingsDiscount << "\n");
840 DEBUG(dbgs() << " Percent cost saved threshold: "
879 // completely unroll (subject to the threshold, checked below); otherwise
881 // threshold value.
958 unsigned Threshold, PartialThreshold;
961 // Only use the high pragma threshold when we have a target unroll factor such
963 // trip count is known. Otherwise we rely on the standard threshold to
969 selectThresholds(L, UsePragmaThreshold, UP, Threshold, PartialThreshold,
980 if (canUnrollCompletely(L, Threshold, 100, DynamicCostSavingsDiscount,
989 Threshold + DynamicCostSavingsDiscount))
990 if (canUnrollCompletely(L, Threshold, PercentDynamicCostSavedThreshold,
1002 // Reduce count based on the type of unrolling and the threshold values.
1031 // the original count which satisfies the threshold limit.