When applying Floyd-Warshall to an isl_map, we don't care about
the domains anymore after we have grouped them.
However, when applying Floyd-Warshall to an isl_union_map, we
use the domains do initialize the grid with maps of the right
dimension. We therefore need to order the domains according
to the group number so that the calling function has a chance
to find them.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
g = 0;
for (i = 0; i < 2 * n; ++i)
- if (group[i] == i)
+ if (group[i] == i) {
+ if (g != i) {
+ (*set)[g] = (*set)[i];
+ (*set)[i] = NULL;
+ }
group[i] = g++;
- else
+ } else
group[i] = group[group[i]];
*n_group = g;