[polly] r246567 - ScopInfo: use project_out instead of remove_dims
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 12:19:28 PDT 2015
Thx.
On 09/01, Tobias Grosser via llvm-commits wrote:
> 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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
--
Johannes Doerfert
Researcher / PhD Student
Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.31
Tel. +49 (0)681 302-57521 : doerfert at cs.uni-saarland.de
Fax. +49 (0)681 302-3065 : http://www.cdl.uni-saarland.de/people/doerfert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150901/b36b0fe9/attachment.sig>
More information about the llvm-commits
mailing list