split parameter domains when convex hull operation drops lower or upper bounds
commitcf1f323da85ae356aa27ffdd94ddf04be3b30321
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 1 Apr 2010 16:16:53 +0000 (1 18:16 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 23 Apr 2010 16:11:32 +0000 (23 18:11 +0200)
treedf3f85158e8e55768b87a1460df09b3f9843a9f6
parent9b9c414a0f44dfb72c6406313a2b08e19d16f69f
split parameter domains when convex hull operation drops lower or upper bounds

If the convex hull of a union of basic sets contains a line, typically
in the direction of a parameter, then this convex hull may not have
an upper or lower bound on some dimensions even if each of the basic
sets in the union does.

As a simple example, take the union of [n] -> { [0] }
and [n] -> { [x] : 0 <= x <= n }.  Both sets clearly have
both a lower and an upper bound on the single domain dimension.
However, the convex hull of this union is [n] -> { [x] : x >= 0 },
which no longer has an upper bound on x.

This problem has probably been in CLooG since day one and has
only recently been reported by Uday Kumar Reddy <udayreddy@gmail.com>.
We can therefore assume that this situation is fairly rare.

Our current solution is to detect the situation where the input
of the convex hull operation has bounds on the current dimension,
but the output does not.  If this happens, we split the parameter
space and recompute the convex hull on each of the pieces.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
include/cloog/domain.h
source/isl/domain.c
source/loop.c
test/Makefile.am
test/param-split.c [new file with mode: 0644]
test/param-split.cloog [new file with mode: 0644]
test/param-split.good.c [new file with mode: 0644]