isl_map_coalesce: avoid dropping constraints redundant wrt implicit equalities
commit9ce5772769759c749dc7c0f083229e48d6b50a6e
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 16 Mar 2013 13:40:56 +0000 (16 14:40 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 17 Mar 2013 18:47:35 +0000 (17 19:47 +0100)
treea8a34967ed0968040f7d8b9c5681b6af71fb222a
parent3961a579833bebbcd7192f4f4fa5464937b6562a
isl_map_coalesce: avoid dropping constraints redundant wrt implicit equalities

isl_map_coalesce first detects implicit equalities in the basic maps.
If two basic maps can indeed be coalesced, then fuse() would
only add this constraint to the fused basic map as an inequality.
Other constraints that imply that this constraint is actually an equality
are redundant with respect to the equality and would not get copied
inside fuse() either.  The end result is that we would lose information.

In principle, we could just modify fuse() to add the implicit equalities
to the fused basic map as equalities, but it seems more prudent to
turn them into explicit equalities from the start.

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