unsigned total = isl_basic_map_total_dim(map->p[i]);
unsigned extra_rows = extra ? extra->n_row : 0;
- fused = isl_basic_map_alloc_dim(isl_dim_copy(map->p[i]->dim),
+ fused = isl_basic_map_alloc_space(isl_space_copy(map->p[i]->dim),
map->p[i]->n_div,
map->p[i]->n_eq + map->p[j]->n_eq,
map->p[i]->n_ineq + map->p[j]->n_ineq + extra_rows);
ISL_F_ISSET(map->p[j], ISL_BASIC_MAP_RATIONAL))
ISL_F_SET(fused, ISL_BASIC_MAP_RATIONAL);
- fused_tab = isl_tab_from_basic_map(fused);
+ fused_tab = isl_tab_from_basic_map(fused, 0);
if (isl_tab_detect_redundant(fused_tab) < 0)
goto error;
set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 1);
isl_seq_neg(bound->el, map->p[i]->ineq[cuts[k]], 1 + total);
- if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set) < 0)
+ if (!tabs[i]->empty &&
+ add_wraps(wraps, map->p[i], tabs[i], bound->el, set) < 0)
goto error;
set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 0);
if (isl_tab_rollback(tabs[i], snap_i) < 0)
goto error;
+ if (tabs[i]->empty)
+ break;
if (!wraps->n_row)
break;
n = map->n;
for (i = 0; i < map->n; ++i) {
- tabs[i] = isl_tab_from_basic_map(map->p[i]);
+ tabs[i] = isl_tab_from_basic_map(map->p[i], 0);
if (!tabs[i])
goto error;
if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT))