detect all one-time loops and convert them to an assignment followed by a guard
commit7a10c39d1bb98def7e27e73f45e31171f4d179c0
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 15 Jul 2010 10:33:38 +0000 (15 12:33 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 15 Jul 2010 10:43:16 +0000 (15 12:43 +0200)
tree2dfdb7f42746c934fb5bc730d912597e8aca47a5
parent417118799b168bba0ff351f31eaf79f92528b8d7
detect all one-time loops and convert them to an assignment followed by a guard

If the lower and upper bound of a loop are exactly the same, then
CLooG would already convert the loop to an assignment to the loop
iterator.  However, even if the bounds are different, the loop
may still be executed at most once and then it is better
to generate an assignment of the lower bound to the iterator
followed by a comparison with the upper bound.
One advantage is that the result can be handled by if-conversion.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
include/cloog/domain.h
include/cloog/loop.h
source/clast.c
source/isl/domain.c
source/loop.c
test/thomasset.c
test/vivien.c
test/vivien2.c