@@ -758,7 +758,7 @@ static unsigned getFullUnrollBoostingFactor(const EstimatedUnrollCost &Cost,
758
758
static std::optional<unsigned >
759
759
shouldPragmaUnroll (Loop *L, const PragmaInfo &PInfo,
760
760
const unsigned TripMultiple, const unsigned TripCount,
761
- unsigned MaxTripCount, const UnrollCostEstimator UCE,
761
+ const UnrollCostEstimator UCE,
762
762
const TargetTransformInfo::UnrollingPreferences &UP) {
763
763
764
764
// Using unroll pragma
@@ -779,10 +779,6 @@ shouldPragmaUnroll(Loop *L, const PragmaInfo &PInfo,
779
779
if (PInfo.PragmaFullUnroll && TripCount != 0 )
780
780
return TripCount;
781
781
782
- if (PInfo.PragmaEnableUnroll && !TripCount && MaxTripCount &&
783
- MaxTripCount <= UP.MaxUpperBound )
784
- return MaxTripCount;
785
-
786
782
// if didn't return until here, should continue to other priorties
787
783
return std::nullopt;
788
784
}
@@ -909,7 +905,7 @@ bool llvm::computeUnrollCount(
909
905
// 1st priority is unroll count set by "unroll-count" option.
910
906
// 2nd priority is unroll count set by pragma.
911
907
if (auto UnrollFactor = shouldPragmaUnroll (L, PInfo, TripMultiple, TripCount,
912
- MaxTripCount, UCE, UP)) {
908
+ UCE, UP)) {
913
909
UP.Count = *UnrollFactor;
914
910
915
911
if (UserUnrollCount || (PragmaCount > 0 )) {
0 commit comments