Lines Matching refs:UP

191   TargetTransformInfo::UnrollingPreferences UP;  in gatherUnrollingPreferences()  local
194 UP.Threshold = in gatherUnrollingPreferences()
196 UP.MaxPercentThresholdBoost = 400; in gatherUnrollingPreferences()
197 UP.OptSizeThreshold = UnrollOptSizeThreshold; in gatherUnrollingPreferences()
198 UP.PartialThreshold = 150; in gatherUnrollingPreferences()
199 UP.PartialOptSizeThreshold = UnrollOptSizeThreshold; in gatherUnrollingPreferences()
200 UP.Count = 0; in gatherUnrollingPreferences()
201 UP.DefaultUnrollRuntimeCount = 8; in gatherUnrollingPreferences()
202 UP.MaxCount = std::numeric_limits<unsigned>::max(); in gatherUnrollingPreferences()
203 UP.FullUnrollMaxCount = std::numeric_limits<unsigned>::max(); in gatherUnrollingPreferences()
204 UP.BEInsns = 2; in gatherUnrollingPreferences()
205 UP.Partial = false; in gatherUnrollingPreferences()
206 UP.Runtime = false; in gatherUnrollingPreferences()
207 UP.AllowRemainder = true; in gatherUnrollingPreferences()
208 UP.UnrollRemainder = false; in gatherUnrollingPreferences()
209 UP.AllowExpensiveTripCount = false; in gatherUnrollingPreferences()
210 UP.Force = false; in gatherUnrollingPreferences()
211 UP.UpperBound = false; in gatherUnrollingPreferences()
212 UP.UnrollAndJam = false; in gatherUnrollingPreferences()
213 UP.UnrollAndJamInnerLoopThreshold = 60; in gatherUnrollingPreferences()
214 UP.MaxIterationsCountToAnalyze = UnrollMaxIterationsCountToAnalyze; in gatherUnrollingPreferences()
217 TTI.getUnrollingPreferences(L, SE, UP); in gatherUnrollingPreferences()
226 UP.Threshold = UP.OptSizeThreshold; in gatherUnrollingPreferences()
227 UP.PartialThreshold = UP.PartialOptSizeThreshold; in gatherUnrollingPreferences()
228 UP.MaxPercentThresholdBoost = 100; in gatherUnrollingPreferences()
233 UP.Threshold = UnrollThreshold; in gatherUnrollingPreferences()
235 UP.PartialThreshold = UnrollPartialThreshold; in gatherUnrollingPreferences()
237 UP.MaxPercentThresholdBoost = UnrollMaxPercentThresholdBoost; in gatherUnrollingPreferences()
239 UP.MaxCount = UnrollMaxCount; in gatherUnrollingPreferences()
241 UP.FullUnrollMaxCount = UnrollFullMaxCount; in gatherUnrollingPreferences()
243 UP.Partial = UnrollAllowPartial; in gatherUnrollingPreferences()
245 UP.AllowRemainder = UnrollAllowRemainder; in gatherUnrollingPreferences()
247 UP.Runtime = UnrollRuntime; in gatherUnrollingPreferences()
249 UP.UpperBound = false; in gatherUnrollingPreferences()
251 UP.UnrollRemainder = UnrollUnrollRemainder; in gatherUnrollingPreferences()
253 UP.MaxIterationsCountToAnalyze = UnrollMaxIterationsCountToAnalyze; in gatherUnrollingPreferences()
257 UP.Threshold = *UserThreshold; in gatherUnrollingPreferences()
258 UP.PartialThreshold = *UserThreshold; in gatherUnrollingPreferences()
261 UP.Count = *UserCount; in gatherUnrollingPreferences()
263 UP.Partial = *UserAllowPartial; in gatherUnrollingPreferences()
265 UP.Runtime = *UserRuntime; in gatherUnrollingPreferences()
267 UP.UpperBound = *UserUpperBound; in gatherUnrollingPreferences()
269 UP.FullUnrollMaxCount = *UserFullUnrollMaxCount; in gatherUnrollingPreferences()
271 return UP; in gatherUnrollingPreferences()
749 uint64_t getUnrolledLoopSize(TargetTransformInfo::UnrollingPreferences &UP) { in getUnrolledLoopSize() argument
750 assert(LoopSize >= UP.BEInsns && in getUnrolledLoopSize()
752 return (uint64_t)(LoopSize - UP.BEInsns) * UP.Count + UP.BEInsns; in getUnrolledLoopSize()
769 TargetTransformInfo::UnrollingPreferences &UP, in computeUnrollCount() argument
781 UP.Count = 1; in computeUnrollCount()
782 UP.Runtime = false; in computeUnrollCount()
790 UP.Count = UnrollCount; in computeUnrollCount()
791 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
792 UP.Force = true; in computeUnrollCount()
793 if (UP.AllowRemainder && UCE.getUnrolledLoopSize(UP) < UP.Threshold) in computeUnrollCount()
800 UP.Count = PragmaCount; in computeUnrollCount()
801 UP.Runtime = true; in computeUnrollCount()
802 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
803 UP.Force = true; in computeUnrollCount()
804 if ((UP.AllowRemainder || (TripMultiple % PragmaCount == 0)) && in computeUnrollCount()
805 UCE.getUnrolledLoopSize(UP) < PragmaUnrollThreshold) in computeUnrollCount()
810 UP.Count = TripCount; in computeUnrollCount()
811 if (UCE.getUnrolledLoopSize(UP) < PragmaUnrollThreshold) in computeUnrollCount()
823 UP.Threshold = std::max<unsigned>(UP.Threshold, PragmaUnrollThreshold); in computeUnrollCount()
824 UP.PartialThreshold = in computeUnrollCount()
825 std::max<unsigned>(UP.PartialThreshold, PragmaUnrollThreshold); in computeUnrollCount()
842 if (!(UP.UpperBound || MaxOrZero) || in computeUnrollCount()
854 UP.Count = FullUnrollTripCount; in computeUnrollCount()
855 if (FullUnrollTripCount && FullUnrollTripCount <= UP.FullUnrollMaxCount) { in computeUnrollCount()
858 if (UCE.getUnrolledLoopSize(UP) < UP.Threshold) { in computeUnrollCount()
867 UP.Threshold * UP.MaxPercentThresholdBoost / 100, in computeUnrollCount()
868 UP.MaxIterationsCountToAnalyze)) { in computeUnrollCount()
870 getFullUnrollBoostingFactor(*Cost, UP.MaxPercentThresholdBoost); in computeUnrollCount()
871 if (Cost->UnrolledCost < UP.Threshold * Boost / 100) { in computeUnrollCount()
880 computePeelCount(L, LoopSize, PP, TripCount, SE, UP.Threshold); in computeUnrollCount()
882 UP.Runtime = false; in computeUnrollCount()
883 UP.Count = 1; in computeUnrollCount()
890 UP.Partial |= ExplicitUnroll; in computeUnrollCount()
891 if (!UP.Partial) { in computeUnrollCount()
894 UP.Count = 0; in computeUnrollCount()
897 if (UP.Count == 0) in computeUnrollCount()
898 UP.Count = TripCount; in computeUnrollCount()
899 if (UP.PartialThreshold != NoThreshold) { in computeUnrollCount()
901 if (UCE.getUnrolledLoopSize(UP) > UP.PartialThreshold) in computeUnrollCount()
902 UP.Count = in computeUnrollCount()
903 (std::max(UP.PartialThreshold, UP.BEInsns + 1) - UP.BEInsns) / in computeUnrollCount()
904 (LoopSize - UP.BEInsns); in computeUnrollCount()
905 if (UP.Count > UP.MaxCount) in computeUnrollCount()
906 UP.Count = UP.MaxCount; in computeUnrollCount()
907 while (UP.Count != 0 && TripCount % UP.Count != 0) in computeUnrollCount()
908 UP.Count--; in computeUnrollCount()
909 if (UP.AllowRemainder && UP.Count <= 1) { in computeUnrollCount()
914 UP.Count = UP.DefaultUnrollRuntimeCount; in computeUnrollCount()
915 while (UP.Count != 0 && in computeUnrollCount()
916 UCE.getUnrolledLoopSize(UP) > UP.PartialThreshold) in computeUnrollCount()
917 UP.Count >>= 1; in computeUnrollCount()
919 if (UP.Count < 2) { in computeUnrollCount()
929 UP.Count = 0; in computeUnrollCount()
932 UP.Count = TripCount; in computeUnrollCount()
934 if (UP.Count > UP.MaxCount) in computeUnrollCount()
935 UP.Count = UP.MaxCount; in computeUnrollCount()
937 UP.Count != TripCount) in computeUnrollCount()
946 LLVM_DEBUG(dbgs() << " partially unrolling with count: " << UP.Count in computeUnrollCount()
965 UP.Count = 0; in computeUnrollCount()
970 if (MaxTripCount && !UP.Force && MaxTripCount < UnrollMaxUpperBound) { in computeUnrollCount()
971 UP.Count = 0; in computeUnrollCount()
981 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
986 UP.Runtime |= PragmaEnableUnroll || PragmaCount > 0 || UserUnrollCount; in computeUnrollCount()
987 if (!UP.Runtime) { in computeUnrollCount()
991 UP.Count = 0; in computeUnrollCount()
994 if (UP.Count == 0) in computeUnrollCount()
995 UP.Count = UP.DefaultUnrollRuntimeCount; in computeUnrollCount()
999 while (UP.Count != 0 && in computeUnrollCount()
1000 UCE.getUnrolledLoopSize(UP) > UP.PartialThreshold) in computeUnrollCount()
1001 UP.Count >>= 1; in computeUnrollCount()
1004 unsigned OrigCount = UP.Count; in computeUnrollCount()
1007 if (!UP.AllowRemainder && UP.Count != 0 && (TripMultiple % UP.Count) != 0) { in computeUnrollCount()
1008 while (UP.Count != 0 && TripMultiple % UP.Count != 0) in computeUnrollCount()
1009 UP.Count >>= 1; in computeUnrollCount()
1016 << " to " << UP.Count << ".\n"); in computeUnrollCount()
1020 if (PragmaCount > 0 && !UP.AllowRemainder) in computeUnrollCount()
1032 << NV("UnrollCount", UP.Count) << " time(s)."; in computeUnrollCount()
1036 if (UP.Count > UP.MaxCount) in computeUnrollCount()
1037 UP.Count = UP.MaxCount; in computeUnrollCount()
1039 if (MaxTripCount && UP.Count > MaxTripCount) in computeUnrollCount()
1040 UP.Count = MaxTripCount; in computeUnrollCount()
1042 LLVM_DEBUG(dbgs() << " runtime unrolling with count: " << UP.Count in computeUnrollCount()
1044 if (UP.Count < 2) in computeUnrollCount()
1045 UP.Count = 0; in computeUnrollCount()
1081 TargetTransformInfo::UnrollingPreferences UP = gatherUnrollingPreferences( in tryToUnrollLoop() local
1090 if (UP.Threshold == 0 && (!UP.Partial || UP.PartialThreshold == 0) && in tryToUnrollLoop()
1099 TTI, EphValues, UP.BEInsns); in tryToUnrollLoop()
1110 UP.Threshold = std::max(UP.Threshold, LoopSize + 1); in tryToUnrollLoop()
1155 UP.AllowRemainder = false; in tryToUnrollLoop()
1171 TripMultiple, LoopSize, UP, PP, UseUpperBound); in tryToUnrollLoop()
1172 if (!UP.Count) in tryToUnrollLoop()
1176 assert(UP.Count == 1 && "Cannot perform peel and unroll in the same step"); in tryToUnrollLoop()
1202 UP.Runtime &= TripCount == 0 && TripMultiple % UP.Count != 0; in tryToUnrollLoop()
1211 {UP.Count, UP.Force, UP.Runtime, UP.AllowExpensiveTripCount, in tryToUnrollLoop()
1212 UP.UnrollRemainder, ForgetAllSCEV}, in tryToUnrollLoop()