Lines Matching refs:UP
113 TargetTransformInfo::UnrollingPreferences UP; in gatherUnrollingPreferences() local
116 UP.Threshold = 150; in gatherUnrollingPreferences()
117 UP.PercentDynamicCostSavedThreshold = 50; in gatherUnrollingPreferences()
118 UP.DynamicCostSavingsDiscount = 100; in gatherUnrollingPreferences()
119 UP.OptSizeThreshold = 0; in gatherUnrollingPreferences()
120 UP.PartialThreshold = UP.Threshold; in gatherUnrollingPreferences()
121 UP.PartialOptSizeThreshold = 0; in gatherUnrollingPreferences()
122 UP.Count = 0; in gatherUnrollingPreferences()
123 UP.MaxCount = UINT_MAX; in gatherUnrollingPreferences()
124 UP.FullUnrollMaxCount = UINT_MAX; in gatherUnrollingPreferences()
125 UP.Partial = false; in gatherUnrollingPreferences()
126 UP.Runtime = false; in gatherUnrollingPreferences()
127 UP.AllowRemainder = true; in gatherUnrollingPreferences()
128 UP.AllowExpensiveTripCount = false; in gatherUnrollingPreferences()
129 UP.Force = false; in gatherUnrollingPreferences()
132 TTI.getUnrollingPreferences(L, UP); in gatherUnrollingPreferences()
136 UP.Threshold = UP.OptSizeThreshold; in gatherUnrollingPreferences()
137 UP.PartialThreshold = UP.PartialOptSizeThreshold; in gatherUnrollingPreferences()
142 UP.Threshold = UnrollThreshold; in gatherUnrollingPreferences()
143 UP.PartialThreshold = UnrollThreshold; in gatherUnrollingPreferences()
146 UP.PercentDynamicCostSavedThreshold = in gatherUnrollingPreferences()
149 UP.DynamicCostSavingsDiscount = UnrollDynamicCostSavingsDiscount; in gatherUnrollingPreferences()
151 UP.MaxCount = UnrollMaxCount; in gatherUnrollingPreferences()
153 UP.FullUnrollMaxCount = UnrollFullMaxCount; in gatherUnrollingPreferences()
155 UP.Partial = UnrollAllowPartial; in gatherUnrollingPreferences()
157 UP.AllowRemainder = UnrollAllowRemainder; in gatherUnrollingPreferences()
159 UP.Runtime = UnrollRuntime; in gatherUnrollingPreferences()
163 UP.Threshold = *UserThreshold; in gatherUnrollingPreferences()
164 UP.PartialThreshold = *UserThreshold; in gatherUnrollingPreferences()
167 UP.Count = *UserCount; in gatherUnrollingPreferences()
169 UP.Partial = *UserAllowPartial; in gatherUnrollingPreferences()
171 UP.Runtime = *UserRuntime; in gatherUnrollingPreferences()
173 return UP; in gatherUnrollingPreferences()
696 TargetTransformInfo::UnrollingPreferences &UP) { in computeUnrollCount() argument
706 UP.Count = UnrollCount; in computeUnrollCount()
707 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
708 UP.Force = true; in computeUnrollCount()
709 if (UP.AllowRemainder && in computeUnrollCount()
710 (LoopSize - BEInsns) * UP.Count + BEInsns < UP.Threshold) in computeUnrollCount()
717 UP.Count = PragmaCount; in computeUnrollCount()
718 UP.Runtime = true; in computeUnrollCount()
719 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
720 UP.Force = true; in computeUnrollCount()
721 if (UP.AllowRemainder && in computeUnrollCount()
722 (LoopSize - BEInsns) * UP.Count + BEInsns < PragmaUnrollThreshold) in computeUnrollCount()
727 UP.Count = TripCount; in computeUnrollCount()
728 if ((LoopSize - BEInsns) * UP.Count + BEInsns < PragmaUnrollThreshold) in computeUnrollCount()
745 UP.Threshold = std::max<unsigned>(UP.Threshold, PragmaUnrollThreshold); in computeUnrollCount()
746 UP.PartialThreshold = in computeUnrollCount()
747 std::max<unsigned>(UP.PartialThreshold, PragmaUnrollThreshold); in computeUnrollCount()
753 if (TripCount && TripCount <= UP.FullUnrollMaxCount) { in computeUnrollCount()
757 if (canUnrollCompletely(L, UP.Threshold, 100, UP.DynamicCostSavingsDiscount, in computeUnrollCount()
759 UP.Count = TripCount; in computeUnrollCount()
767 UP.Threshold + UP.DynamicCostSavingsDiscount)) in computeUnrollCount()
768 if (canUnrollCompletely(L, UP.Threshold, in computeUnrollCount()
769 UP.PercentDynamicCostSavedThreshold, in computeUnrollCount()
770 UP.DynamicCostSavingsDiscount, in computeUnrollCount()
772 UP.Count = TripCount; in computeUnrollCount()
781 if (UP.Count == 0) in computeUnrollCount()
782 UP.Count = TripCount; in computeUnrollCount()
783 UP.Partial |= ExplicitUnroll; in computeUnrollCount()
784 if (!UP.Partial) { in computeUnrollCount()
787 UP.Count = 0; in computeUnrollCount()
790 if (UP.PartialThreshold != NoThreshold) { in computeUnrollCount()
792 UnrolledSize = (uint64_t)(LoopSize - BEInsns) * UP.Count + BEInsns; in computeUnrollCount()
793 if (UnrolledSize > UP.PartialThreshold) in computeUnrollCount()
794 UP.Count = (std::max(UP.PartialThreshold, 3u) - BEInsns) / in computeUnrollCount()
796 if (UP.Count > UP.MaxCount) in computeUnrollCount()
797 UP.Count = UP.MaxCount; in computeUnrollCount()
798 while (UP.Count != 0 && TripCount % UP.Count != 0) in computeUnrollCount()
799 UP.Count--; in computeUnrollCount()
800 if (UP.AllowRemainder && UP.Count <= 1) { in computeUnrollCount()
805 UP.Count = DefaultUnrollRuntimeCount; in computeUnrollCount()
806 UnrolledSize = (LoopSize - BEInsns) * UP.Count + BEInsns; in computeUnrollCount()
807 while (UP.Count != 0 && UnrolledSize > UP.PartialThreshold) { in computeUnrollCount()
808 UP.Count >>= 1; in computeUnrollCount()
809 UnrolledSize = (LoopSize - BEInsns) * UP.Count + BEInsns; in computeUnrollCount()
812 if (UP.Count < 2) { in computeUnrollCount()
818 UP.Count = 0; in computeUnrollCount()
821 UP.Count = TripCount; in computeUnrollCount()
824 UP.Count != TripCount) in computeUnrollCount()
842 UP.Count = 0; in computeUnrollCount()
846 UP.Runtime |= PragmaEnableUnroll || PragmaCount > 0 || UserUnrollCount; in computeUnrollCount()
847 if (!UP.Runtime) { in computeUnrollCount()
850 UP.Count = 0; in computeUnrollCount()
853 if (UP.Count == 0) in computeUnrollCount()
854 UP.Count = DefaultUnrollRuntimeCount; in computeUnrollCount()
855 UnrolledSize = (LoopSize - BEInsns) * UP.Count + BEInsns; in computeUnrollCount()
859 while (UP.Count != 0 && UnrolledSize > UP.PartialThreshold) { in computeUnrollCount()
860 UP.Count >>= 1; in computeUnrollCount()
861 UnrolledSize = (LoopSize - BEInsns) * UP.Count + BEInsns; in computeUnrollCount()
865 unsigned OrigCount = UP.Count; in computeUnrollCount()
868 if (!UP.AllowRemainder && UP.Count != 0 && (TripMultiple % UP.Count) != 0) { in computeUnrollCount()
869 while (UP.Count != 0 && TripMultiple % UP.Count != 0) in computeUnrollCount()
870 UP.Count >>= 1; in computeUnrollCount()
876 << OrigCount << " to " << UP.Count << ".\n"); in computeUnrollCount()
877 if (PragmaCount > 0 && !UP.AllowRemainder) in computeUnrollCount()
885 Twine(TripMultiple) + ". Unrolling instead " + Twine(UP.Count) + in computeUnrollCount()
889 if (UP.Count > UP.MaxCount) in computeUnrollCount()
890 UP.Count = UP.MaxCount; in computeUnrollCount()
891 DEBUG(dbgs() << " partially unrolling with count: " << UP.Count << "\n"); in computeUnrollCount()
892 if (UP.Count < 2) in computeUnrollCount()
893 UP.Count = 0; in computeUnrollCount()
945 TargetTransformInfo::UnrollingPreferences UP = gatherUnrollingPreferences( in tryToUnrollLoop() local
962 UP.AllowRemainder = false; in tryToUnrollLoop()
965 TripMultiple, LoopSize, UP); in tryToUnrollLoop()
966 if (!UP.Count) in tryToUnrollLoop()
969 if (TripCount && UP.Count > TripCount) in tryToUnrollLoop()
970 UP.Count = TripCount; in tryToUnrollLoop()
973 if (!UnrollLoop(L, UP.Count, TripCount, UP.Force, UP.Runtime, in tryToUnrollLoop()
974 UP.AllowExpensiveTripCount, TripMultiple, LI, SE, &DT, &AC, in tryToUnrollLoop()