summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 2caab15adfa..6f8de706fb0 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -311,18 +311,18 @@ static __isl_give isl_set *addRangeBoundsToSet(__isl_take isl_set *S,
isl_val *V;
isl_ctx *ctx = isl_set_get_ctx(S);
- bool isWrapping = Range.isSignWrappedSet();
- const auto LB = isWrapping ? Range.getLower() : Range.getSignedMin();
+ bool useLowerUpperBound = Range.isSignWrappedSet() && !Range.isFullSet();
+ const auto LB = useLowerUpperBound ? Range.getLower() : Range.getSignedMin();
V = isl_valFromAPInt(ctx, LB, true);
isl_set *SLB = isl_set_lower_bound_val(isl_set_copy(S), type, dim, V);
- const auto UB = isWrapping ? Range.getUpper() : Range.getSignedMax();
+ const auto UB = useLowerUpperBound ? Range.getUpper() : Range.getSignedMax();
V = isl_valFromAPInt(ctx, UB, true);
- if (isWrapping)
+ if (useLowerUpperBound)
V = isl_val_sub_ui(V, 1);
isl_set *SUB = isl_set_upper_bound_val(S, type, dim, V);
- if (isWrapping)
+ if (useLowerUpperBound)
return isl_set_union(SLB, SUB);
else
return isl_set_intersect(SLB, SUB);
@@ -1345,10 +1345,6 @@ void Scop::addParameterBounds() {
ConstantRange SRange = SE->getSignedRange(ParamID.first);
- // TODO: Find a case where the full set is actually helpful.
- if (SRange.isFullSet())
- continue;
-
Context = addRangeBoundsToSet(Context, SRange, dim, isl_dim_param);
}
}
OpenPOWER on IntegriCloud