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, &ORE); 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()
762 getUnrolledLoopSize(const TargetTransformInfo::UnrollingPreferences &UP, in getUnrolledLoopSize() argument
764 assert(LoopSize >= UP.BEInsns && in getUnrolledLoopSize()
767 return static_cast<uint64_t>(LoopSize - UP.BEInsns) * CountOverwrite + in getUnrolledLoopSize()
768 UP.BEInsns; in getUnrolledLoopSize()
770 return static_cast<uint64_t>(LoopSize - UP.BEInsns) * UP.Count + in getUnrolledLoopSize()
771 UP.BEInsns; in getUnrolledLoopSize()
779 const TargetTransformInfo::UnrollingPreferences &UP) { in shouldPragmaUnroll() argument
785 if (UP.AllowRemainder && in shouldPragmaUnroll()
786 UCE.getUnrolledLoopSize(UP, (unsigned)UnrollCount) < UP.Threshold) in shouldPragmaUnroll()
792 if ((UP.AllowRemainder || (TripMultiple % PInfo.PragmaCount == 0))) in shouldPragmaUnroll()
807 const TargetTransformInfo::UnrollingPreferences &UP) { in shouldFullUnroll() argument
810 if (FullUnrollTripCount > UP.FullUnrollMaxCount) in shouldFullUnroll()
815 if (UCE.getUnrolledLoopSize(UP) < UP.Threshold) in shouldFullUnroll()
823 UP.Threshold * UP.MaxPercentThresholdBoost / 100, in shouldFullUnroll()
824 UP.MaxIterationsCountToAnalyze)) { in shouldFullUnroll()
826 getFullUnrollBoostingFactor(*Cost, UP.MaxPercentThresholdBoost); in shouldFullUnroll()
827 if (Cost->UnrolledCost < UP.Threshold * Boost / 100) in shouldFullUnroll()
836 const TargetTransformInfo::UnrollingPreferences &UP) { in shouldPartialUnroll() argument
841 if (!UP.Partial) { in shouldPartialUnroll()
846 unsigned count = UP.Count; in shouldPartialUnroll()
849 if (UP.PartialThreshold != NoThreshold) { in shouldPartialUnroll()
851 if (UCE.getUnrolledLoopSize(UP, count) > UP.PartialThreshold) in shouldPartialUnroll()
852 count = (std::max(UP.PartialThreshold, UP.BEInsns + 1) - UP.BEInsns) / in shouldPartialUnroll()
853 (LoopSize - UP.BEInsns); in shouldPartialUnroll()
854 if (count > UP.MaxCount) in shouldPartialUnroll()
855 count = UP.MaxCount; in shouldPartialUnroll()
858 if (UP.AllowRemainder && count <= 1) { in shouldPartialUnroll()
863 count = UP.DefaultUnrollRuntimeCount; in shouldPartialUnroll()
865 UCE.getUnrolledLoopSize(UP, count) > UP.PartialThreshold) in shouldPartialUnroll()
874 if (count > UP.MaxCount) in shouldPartialUnroll()
875 count = UP.MaxCount; in shouldPartialUnroll()
894 TargetTransformInfo::UnrollingPreferences &UP, in computeUnrollCount() argument
916 UP.Count = 1; in computeUnrollCount()
917 UP.Runtime = false; in computeUnrollCount()
924 UCE, UP)) { in computeUnrollCount()
925 UP.Count = *UnrollFactor; in computeUnrollCount()
928 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
929 UP.Force = true; in computeUnrollCount()
931 UP.Runtime |= (PragmaCount > 0); in computeUnrollCount()
938 UP.Threshold = std::max<unsigned>(UP.Threshold, PragmaUnrollThreshold); in computeUnrollCount()
939 UP.PartialThreshold = in computeUnrollCount()
940 std::max<unsigned>(UP.PartialThreshold, PragmaUnrollThreshold); in computeUnrollCount()
946 UP.Count = 0; in computeUnrollCount()
948 UP.Count = TripCount; in computeUnrollCount()
950 TripCount, UCE, UP)) { in computeUnrollCount()
951 UP.Count = *UnrollFactor; in computeUnrollCount()
969 if (!TripCount && MaxTripCount && (UP.UpperBound || MaxOrZero) && in computeUnrollCount()
971 UP.Count = MaxTripCount; in computeUnrollCount()
973 MaxTripCount, UCE, UP)) { in computeUnrollCount()
974 UP.Count = *UnrollFactor; in computeUnrollCount()
981 computePeelCount(L, LoopSize, PP, TripCount, DT, SE, UP.Threshold); in computeUnrollCount()
983 UP.Runtime = false; in computeUnrollCount()
984 UP.Count = 1; in computeUnrollCount()
991 UP.Partial |= ExplicitUnroll; in computeUnrollCount()
995 if (auto UnrollFactor = shouldPartialUnroll(LoopSize, TripCount, UCE, UP)) { in computeUnrollCount()
996 UP.Count = *UnrollFactor; in computeUnrollCount()
999 UP.Count != TripCount) in computeUnrollCount()
1009 if (UP.PartialThreshold != NoThreshold) { in computeUnrollCount()
1010 if (UP.Count == 0) { in computeUnrollCount()
1039 UP.Count = 0; in computeUnrollCount()
1044 if (MaxTripCount && !UP.Force && MaxTripCount < UnrollMaxUpperBound) { in computeUnrollCount()
1045 UP.Count = 0; in computeUnrollCount()
1055 UP.AllowExpensiveTripCount = true; in computeUnrollCount()
1058 UP.Runtime |= PragmaEnableUnroll || PragmaCount > 0 || UserUnrollCount; in computeUnrollCount()
1059 if (!UP.Runtime) { in computeUnrollCount()
1063 UP.Count = 0; in computeUnrollCount()
1066 if (UP.Count == 0) in computeUnrollCount()
1067 UP.Count = UP.DefaultUnrollRuntimeCount; in computeUnrollCount()
1071 while (UP.Count != 0 && in computeUnrollCount()
1072 UCE.getUnrolledLoopSize(UP) > UP.PartialThreshold) in computeUnrollCount()
1073 UP.Count >>= 1; in computeUnrollCount()
1076 unsigned OrigCount = UP.Count; in computeUnrollCount()
1079 if (!UP.AllowRemainder && UP.Count != 0 && (TripMultiple % UP.Count) != 0) { in computeUnrollCount()
1080 while (UP.Count != 0 && TripMultiple % UP.Count != 0) in computeUnrollCount()
1081 UP.Count >>= 1; in computeUnrollCount()
1088 << " to " << UP.Count << ".\n"); in computeUnrollCount()
1092 if (unrollCountPragmaValue(L) > 0 && !UP.AllowRemainder) in computeUnrollCount()
1104 << NV("UnrollCount", UP.Count) << " time(s)."; in computeUnrollCount()
1108 if (UP.Count > UP.MaxCount) in computeUnrollCount()
1109 UP.Count = UP.MaxCount; in computeUnrollCount()
1111 if (MaxTripCount && UP.Count > MaxTripCount) in computeUnrollCount()
1112 UP.Count = MaxTripCount; in computeUnrollCount()
1114 LLVM_DEBUG(dbgs() << " runtime unrolling with count: " << UP.Count in computeUnrollCount()
1116 if (UP.Count < 2) in computeUnrollCount()
1117 UP.Count = 0; in computeUnrollCount()
1178 TargetTransformInfo::UnrollingPreferences UP = gatherUnrollingPreferences( in tryToUnrollLoop() local
1187 if (UP.Threshold == 0 && (!UP.Partial || UP.PartialThreshold == 0) && in tryToUnrollLoop()
1196 TTI, EphValues, UP.BEInsns); in tryToUnrollLoop()
1215 UP.Threshold = std::max(UP.Threshold, LoopSize + 1); in tryToUnrollLoop()
1260 UP.AllowRemainder = false; in tryToUnrollLoop()
1276 TripMultiple, LoopSize, UP, PP, UseUpperBound); in tryToUnrollLoop()
1277 if (!UP.Count) in tryToUnrollLoop()
1281 assert(UP.Count == 1 && "Cannot perform peel and unroll in the same step"); in tryToUnrollLoop()
1307 UP.Runtime &= TripCount == 0 && TripMultiple % UP.Count != 0; in tryToUnrollLoop()
1316 {UP.Count, UP.Force, UP.Runtime, UP.AllowExpensiveTripCount, in tryToUnrollLoop()
1317 UP.UnrollRemainder, ForgetAllSCEV}, in tryToUnrollLoop()