isl_map_coalesce: only coalesce pairs of basic maps with the same divs
commita73f222ef930f0c53f38a239e28df5f69c6df0a3
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 17 Apr 2012 17:05:00 +0000 (17 19:05 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 18 Apr 2012 10:41:03 +0000 (18 12:41 +0200)
tree8a7f1ec326d5e59dfc99206f310658697332bc8e
parente2636ddfc0f63fea37bae350977df2c5aba03430
isl_map_coalesce: only coalesce pairs of basic maps with the same divs

Most of the heuristics won't be able to find any coalescing opportunities
on basic maps with different divs, so it's not worth it to even try.
A notable exception is the subset test, which is now handled separately.

Since we only perform the tests after checking that the divs are the same,
there is no point in aligning the divs over all basic maps.  This could
be a very expensive operation, especially if some divs are unknown as it
would then compute explicit representations for all divs.  This could have
the counter-intuitive effect that the ouptut of isl_map_coalesce would have
_more_ basic maps (because of the splits introduced during the computation
of explicit representations) than the input.
Instead, we know simply sort the known divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_coalesce.c