[polly] r246567 - ScopInfo: use project_out instead of remove_dims
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 11:17:42 PDT 2015
Author: grosser
Date: Tue Sep 1 13:17:41 2015
New Revision: 246567
URL: http://llvm.org/viewvc/llvm-project?rev=246567&view=rev
Log:
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.
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=246567&r1=246566&r2=246567&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Tue Sep 1 13:17:41 2015
@@ -1584,13 +1584,14 @@ void Scop::buildDomainsWithBranchConstra
// 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
More information about the llvm-commits
mailing list