isl_basic_map_simplify: avoid infinite loop on empty input
commit3961a579833bebbcd7192f4f4fa5464937b6562a
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 14 Mar 2013 16:47:14 +0000 (14 17:47 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Mar 2013 09:40:19 +0000 (15 10:40 +0100)
treecac326bf921e92d71d530a0fcf6bbaa63a0dabc8
parentca10080dfcc861720c6354c4ec1b937f5eec106f
isl_basic_map_simplify: avoid infinite loop on empty input

eliminate_divs_ineq skips the step of actually removing the div
if the basic map is marked empty.  This is needed because in the
process of marking the basic map empty, the constraints may have
been replaced by the canonical representation of an empty basic map
which does not have any divs.
However, the basic map may have already been marked empty before,
possibly without having the constraints replaced by the canonical
representation.  In such cases, we would also skip the step that
remove the div, but it would actually still be present and we would
keep making "progress" in every iteration of isl_basic_map_simplify,
resulting in an infinite loop.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map_simplify.c
isl_test.c