ScopInfo: use project_out instead of remove_dims
By just removing dimensions (and the constraints they are involved in) we may loose information about the dimensions we do not remove. By instead using project_out, we are sure all constraints on the outer dimensions are preserved. No test case, as this error condition is very unlikely to be triggered by isl's current code. We still 'fix' this, as isl gives little guarantees regarding the behavior of remove_divs. llvm-svn: 246567
This commit is contained in:
parent
a71dabd591
commit
2df884f95a
|
@ -1584,13 +1584,14 @@ void Scop::buildDomainsWithBranchConstraints(Region *R, LoopInfo &LI,
|
|||
// and enter a new one we need to drop the old constraints.
|
||||
int SuccBBLoopDepth = getRelativeLoopDepth(SuccBBLoop);
|
||||
assert(std::abs(BBLoopDepth - SuccBBLoopDepth) <= 1);
|
||||
if (BBLoopDepth > SuccBBLoopDepth)
|
||||
CondSet = isl_set_remove_dims(CondSet, isl_dim_set, BBLoopDepth, 1);
|
||||
else if (SuccBBLoopDepth > BBLoopDepth)
|
||||
if (BBLoopDepth > SuccBBLoopDepth) {
|
||||
CondSet = isl_set_project_out(CondSet, isl_dim_set, BBLoopDepth, 1);
|
||||
} else if (SuccBBLoopDepth > BBLoopDepth) {
|
||||
CondSet = isl_set_add_dims(CondSet, isl_dim_set, 1);
|
||||
else if (BBLoopDepth >= 0)
|
||||
CondSet = isl_set_drop_constraints_involving_dims(
|
||||
CondSet, isl_dim_set, BBLoopDepth, 1);
|
||||
} else if (BBLoopDepth >= 0) {
|
||||
CondSet = isl_set_project_out(CondSet, isl_dim_set, BBLoopDepth, 1);
|
||||
CondSet = isl_set_add_dims(CondSet, isl_dim_set, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the domain for the successor or merge it with an existing domain in
|
||||
|
|
Loading…
Reference in New Issue