forked from OSchip/llvm-project
Improve accuracy of Scop::hasFeasibleRuntimeContext
If the AssumptionContext is a subset of the InvalidContext the runtime context is not feasible. llvm-svn: 267285
This commit is contained in:
parent
1dc12aff8a
commit
94341c996d
|
@ -3477,13 +3477,16 @@ __isl_give isl_set *Scop::getAssumedContext() const {
|
|||
|
||||
bool Scop::hasFeasibleRuntimeContext() const {
|
||||
auto *PositiveContext = getAssumedContext();
|
||||
PositiveContext = addNonEmptyDomainConstraints(PositiveContext);
|
||||
bool IsFeasible = !isl_set_is_empty(PositiveContext);
|
||||
isl_set_free(PositiveContext);
|
||||
if (!IsFeasible)
|
||||
return false;
|
||||
|
||||
auto *NegativeContext = getInvalidContext();
|
||||
PositiveContext = addNonEmptyDomainConstraints(PositiveContext);
|
||||
bool IsFeasible = !(isl_set_is_empty(PositiveContext) ||
|
||||
isl_set_is_subset(PositiveContext, NegativeContext));
|
||||
isl_set_free(PositiveContext);
|
||||
if (!IsFeasible) {
|
||||
isl_set_free(NegativeContext);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto *DomainContext = isl_union_set_params(getDomains());
|
||||
IsFeasible = !isl_set_is_subset(DomainContext, NegativeContext);
|
||||
IsFeasible &= !isl_set_is_subset(Context, NegativeContext);
|
||||
|
|
Loading…
Reference in New Issue