fix backtracking in presence of constant loops
commitb1302745c4d62a058d2eb0ae9ba17a10ed107935
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 24 Mar 2011 20:48:27 +0000 (24 21:48 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Mar 2011 08:36:07 +0000 (26 09:36 +0100)
tree11b6cceaf168e89ad4fb2a436894c37f77cfdb51
parentf043665b3fc2be3afedcdcc4039bd8a2b5e888fe
fix backtracking in presence of constant loops

9802965 (cloog_loop_generate_general: add special treatment for loops
with constant value, Sat Dec 4 17:57:26 2010 +0100) broke backtracking
because it would only retain the constraints on the constant loop iterator
during its special treatment of constant loops and not the constraints on
outer loop iterations.  This had gone mostly unnoticed because backtracking
is no longer the default.
We simply add back the constraints on the outer loops during backtracking.

Without this patch, the output of the new test case
(with options -f 1 -backtrack) is

    for (;;c1++) {
      if (c1 == 0) {
S1(0);
      }
    }

Reported-by: Uday Kumar Reddy <udayreddy@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
source/loop.c
test/Makefile.am
test/backtrack.c [new file with mode: 0644]
test/backtrack.cloog [new file with mode: 0644]
test/backtrack.good.c [new file with mode: 0644]