reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/polly/lib/External/isl/isl_coalesce.c
  207 	n_eq = isl_basic_map_n_equality(info->bmap);
  219 	n_ineq = isl_basic_map_n_inequality(info->bmap);
  234 	n_eq = isl_basic_map_n_equality(info->bmap);
  247 	n_ineq = isl_basic_map_n_inequality(info->bmap);
  259 	n_eq = isl_basic_map_n_equality(info->bmap);
  271 	n_ineq = isl_basic_map_n_inequality(info->bmap);
  282 	for (i = 0; i < 2 * info->bmap->n_eq; ++i) {
  292 	for (i = 0; i < info->bmap->n_ineq; ++i) {
  314 	hull = isl_basic_map_copy(info->bmap);
  336 		isl_basic_map_free(info[i].bmap);
  349 	info->bmap = isl_basic_map_free(info->bmap);
  349 	info->bmap = isl_basic_map_free(info->bmap);
  419 	for (k = 0; k < info->bmap->n_eq; ++k) {
  425 			isl_seq_cpy(bmap->eq[l], info->bmap->eq[k], len);
  430 			isl_seq_neg(bmap->ineq[l], info->bmap->eq[k], len);
  435 			isl_seq_cpy(bmap->ineq[l], info->bmap->eq[k], len);
  439 	for (k = 0; k < info->bmap->n_ineq; ++k) {
  445 		isl_seq_cpy(bmap->ineq[l], info->bmap->ineq[k], len);
  461 	n_old = 2 * info[i].bmap->n_eq + info[i].bmap->n_ineq;
  461 	n_old = 2 * info[i].bmap->n_eq + info[i].bmap->n_ineq;
  462 	n_old += 2 * info[j].bmap->n_eq + info[j].bmap->n_ineq;
  462 	n_old += 2 * info[j].bmap->n_eq + info[j].bmap->n_ineq;
  494 	unsigned total = isl_basic_map_total_dim(info[i].bmap);
  502 	n_eq = info[i].bmap->n_eq + info[j].bmap->n_eq;
  502 	n_eq = info[i].bmap->n_eq + info[j].bmap->n_eq;
  503 	n_ineq = info[i].bmap->n_ineq + info[j].bmap->n_ineq;
  503 	n_ineq = info[i].bmap->n_ineq + info[j].bmap->n_ineq;
  504 	fused = isl_basic_map_alloc_space(isl_space_copy(info[i].bmap->dim),
  505 		    info[i].bmap->n_div, n_eq, n_eq + n_ineq + extra_rows);
  510 	if (ISL_F_ISSET(info[i].bmap, ISL_BASIC_MAP_RATIONAL) &&
  511 	    ISL_F_ISSET(info[j].bmap, ISL_BASIC_MAP_RATIONAL))
  514 	for (k = 0; k < info[i].bmap->n_div; ++k) {
  518 		if (isl_seq_eq(info[i].bmap->div[k], info[j].bmap->div[k],
  518 		if (isl_seq_eq(info[i].bmap->div[k], info[j].bmap->div[k],
  520 			isl_seq_cpy(fused->div[l], info[i].bmap->div[k],
  555 	isl_basic_map_free(info[i].bmap);
  556 	info[i].bmap = fused;
  602 	unsigned n_eq = info[i].bmap->n_eq;
  609 	for (k = 0; k < info[i].bmap->n_ineq; ++k) {
  614 		for (l = 0; l < info[j].bmap->n_ineq; ++l) {
  618 			stat = status_in(info[j].bmap->ineq[l], info[i].tab);
  626 		if (l < info[j].bmap->n_ineq)
  630 	if (k < info[i].bmap->n_ineq) {
  648 	isl_basic_map *bmap = info->bmap;
  725 	unsigned n_eq = info[i].bmap->n_eq;
  726 	unsigned total = isl_basic_map_total_dim(info[i].bmap);
  730 	if (isl_tab_extend_cons(info[i].tab, 1 + info[j].bmap->n_ineq) < 0)
  735 		isl_die(isl_basic_map_get_ctx(info[i].bmap), isl_error_internal,
  744 	isl_seq_neg(info[i].bmap->ineq[k], info[i].bmap->ineq[k], 1 + total);
  744 	isl_seq_neg(info[i].bmap->ineq[k], info[i].bmap->ineq[k], 1 + total);
  745 	isl_int_sub_ui(info[i].bmap->ineq[k][0], info[i].bmap->ineq[k][0], 1);
  745 	isl_int_sub_ui(info[i].bmap->ineq[k][0], info[i].bmap->ineq[k][0], 1);
  746 	r = isl_tab_add_ineq(info[i].tab, info[i].bmap->ineq[k]);
  747 	isl_seq_neg(info[i].bmap->ineq[k], info[i].bmap->ineq[k], 1 + total);
  747 	isl_seq_neg(info[i].bmap->ineq[k], info[i].bmap->ineq[k], 1 + total);
  748 	isl_int_sub_ui(info[i].bmap->ineq[k][0], info[i].bmap->ineq[k][0], 1);
  748 	isl_int_sub_ui(info[i].bmap->ineq[k][0], info[i].bmap->ineq[k][0], 1);
  752 	for (k = 0; k < info[j].bmap->n_ineq; ++k) {
  755 		if (isl_tab_add_ineq(info[i].tab, info[j].bmap->ineq[k]) < 0)
  933 	isl_int_sub(info->bmap->ineq[ineq][0],
  934 		    info->bmap->ineq[ineq][0], v->el[0]);
  935 	r = isl_tab_add_ineq(info->tab, info->bmap->ineq[ineq]);
  936 	isl_int_add(info->bmap->ineq[ineq][0],
  937 		    info->bmap->ineq[ineq][0], v->el[0]);
  994 	ctx = isl_basic_map_get_ctx(info->bmap);
  995 	total = isl_basic_map_total_dim(info->bmap);
  996 	isl_int_add_ui(info->bmap->ineq[k][0], info->bmap->ineq[k][0], 1);
  996 	isl_int_add_ui(info->bmap->ineq[k][0], info->bmap->ineq[k][0], 1);
  997 	T = isl_mat_sub_alloc6(ctx, info->bmap->ineq, k, 1, 0, 1 + total);
  999 	isl_int_sub_ui(info->bmap->ineq[k][0], info->bmap->ineq[k][0], 1);
  999 	isl_int_sub_ui(info->bmap->ineq[k][0], info->bmap->ineq[k][0], 1);
 1014 	for (i = 0; i < info->bmap->n_ineq; ++i) {
 1020 		handle = is_affected(info->bmap, i, affected, total);
 1028 		isl_seq_cpy(v->el, info->bmap->ineq[i], 1 + total);
 1062 	info[i].bmap = isl_basic_map_cow(info[i].bmap);
 1062 	info[i].bmap = isl_basic_map_cow(info[i].bmap);
 1063 	if (!info[i].bmap)
 1065 	total = isl_basic_map_total_dim(info[i].bmap);
 1066 	for (l = 0; l < info[i].bmap->n_div; ++l)
 1067 		if (!isl_seq_eq(info[i].bmap->div[l],
 1068 				info[j].bmap->div[l], 1 + 1 + total)) {
 1069 			isl_int_set_si(info[i].bmap->div[l][0], 0);
 1073 		isl_int_add_ui(info[i].bmap->ineq[relax[l]][0],
 1074 				info[i].bmap->ineq[relax[l]][0], 1);
 1075 	ISL_F_SET(info[i].bmap, ISL_BASIC_MAP_FINAL);
 1132 	unsigned n_eq = info[i].bmap->n_eq;
 1194 	unsigned total = isl_basic_map_total_dim(info->bmap);
 1198 	for (k = 0; k < info->bmap->n_eq; ++k) {
 1202 		isl_seq_abs_max(info->bmap->eq[k] + 1, total, &max_k);
 1207 	for (k = 0; k < info->bmap->n_ineq; ++k) {
 1211 		isl_seq_abs_max(info->bmap->ineq[k] + 1, total, &max_k);
 1329 	isl_basic_map *bmap = info->bmap;
 1443 	unsigned total = isl_basic_map_total_dim(info->bmap);
 1447 	if (isl_tab_select_facet(info->tab, info->bmap->n_eq + k) < 0)
 1452 	isl_seq_neg(bound, info->bmap->ineq[k], 1 + total);
 1497 	unsigned total = isl_basic_map_total_dim(info[i].bmap);
 1499 	set_i = set_from_updated_bmap(info[i].bmap, info[i].tab);
 1500 	set_j = set_from_updated_bmap(info[j].bmap, info[j].tab);
 1501 	ctx = isl_basic_map_get_ctx(info[i].bmap);
 1502 	mat = isl_mat_alloc(ctx, 2 * (info[i].bmap->n_eq + info[j].bmap->n_eq) +
 1502 	mat = isl_mat_alloc(ctx, 2 * (info[i].bmap->n_eq + info[j].bmap->n_eq) +
 1503 				    info[i].bmap->n_ineq + info[j].bmap->n_ineq,
 1503 				    info[i].bmap->n_ineq + info[j].bmap->n_ineq,
 1511 	isl_seq_cpy(bound->el, info[i].bmap->ineq[k], 1 + total);
 1617 	total = isl_basic_map_total_dim(info[i].bmap);
 1623 	for (k = 0; k < info[i].bmap->n_eq; ++k) {
 1630 					    info[i].bmap->eq[k], 1 + total);
 1633 					    info[i].bmap->eq[k], 1 + total);
 1642 	for (k = 0; k < info[i].bmap->n_ineq; ++k) {
 1647 			    info[i].bmap->ineq[k], 1 + total);
 1677 	unsigned total = isl_basic_map_total_dim(info[i].bmap);
 1683 	max_wrap = 1 + 2 * info[j].bmap->n_eq + info[j].bmap->n_ineq;
 1683 	max_wrap = 1 + 2 * info[j].bmap->n_eq + info[j].bmap->n_ineq;
 1686 	set_i = set_from_updated_bmap(info[i].bmap, info[i].tab);
 1687 	ctx = isl_basic_map_get_ctx(info[i].bmap);
 1786 	if (ISL_F_ISSET(info[i].bmap, ISL_BASIC_MAP_RATIONAL) ||
 1787 	    ISL_F_ISSET(info[j].bmap, ISL_BASIC_MAP_RATIONAL))
 1794 	total = isl_basic_map_total_dim(info[i].bmap);
 1795 	for (k = 0; k < info[i].bmap->n_eq; ++k) {
 1803 				isl_seq_neg(info[i].bmap->eq[k],
 1804 					    info[i].bmap->eq[k], 1 + total);
 1806 					    info[i].bmap->eq[k]);
 1808 				isl_seq_neg(info[i].bmap->eq[k],
 1809 					    info[i].bmap->eq[k], 1 + total);
 1817 	for (k = 0; k < info[i].bmap->n_ineq; ++k) {
 1823 		type = type_of_relaxed(info[j].tab, info[i].bmap->ineq[k]);
 1860 	for (l = 0; l < info[i].bmap->n_ineq; ++l) {
 1865 		type = type_of_relaxed(info[j].tab, info[i].bmap->ineq[l]);
 1907 		ctx = isl_basic_map_get_ctx(info[i].bmap);
 2031 	unsigned total = isl_basic_map_total_dim(info[i].bmap);
 2038 	set_i = set_from_updated_bmap(info[i].bmap, info[i].tab);
 2039 	set_j = set_from_updated_bmap(info[j].bmap, info[j].tab);
 2040 	ctx = isl_basic_map_get_ctx(info[i].bmap);
 2041 	mat = isl_mat_alloc(ctx, 2 * (info[i].bmap->n_eq + info[j].bmap->n_eq) +
 2041 	mat = isl_mat_alloc(ctx, 2 * (info[i].bmap->n_eq + info[j].bmap->n_eq) +
 2042 				    info[i].bmap->n_ineq + info[j].bmap->n_ineq,
 2042 				    info[i].bmap->n_ineq + info[j].bmap->n_ineq,
 2051 		isl_seq_neg(bound->el, info[i].bmap->eq[k / 2], 1 + total);
 2053 		isl_seq_cpy(bound->el, info[i].bmap->eq[k / 2], 1 + total);
 2106 	info->eq = eq_status_in(info->bmap, tab);
 2118 	info->ineq = ineq_status_in(info->bmap, info->tab, tab);
 2141 	for (i = 0; i < info->bmap->n_ineq; ++i) {
 2173 	if (all(info[j].eq, 2 * info[j].bmap->n_eq, STATUS_VALID) &&
 2274 	if (info[i].bmap->n_ineq && !info[i].ineq)
 2282 	if (info[j].bmap->n_ineq && !info[j].ineq)
 2290 	if (info[i].bmap->n_eq && !info[i].eq)
 2296 	if (info[j].bmap->n_eq && !info[j].eq)
 2306 	if (all(info[i].eq, 2 * info[i].bmap->n_eq, STATUS_VALID) &&
 2307 	    all(info[i].ineq, info[i].bmap->n_ineq, STATUS_VALID)) {
 2310 	} else if (all(info[j].eq, 2 * info[j].bmap->n_eq, STATUS_VALID) &&
 2311 		   all(info[j].ineq, info[j].bmap->n_ineq, STATUS_VALID)) {
 2377 	info->bmap = isl_basic_map_shift_div(info->bmap, div, 0, shift);
 2377 	info->bmap = isl_basic_map_shift_div(info->bmap, div, 0, shift);
 2378 	if (!info->bmap)
 2381 	total = isl_basic_map_dim(info->bmap, isl_dim_all);
 2382 	total -= isl_basic_map_dim(info->bmap, isl_dim_div);
 2425 	defined = isl_basic_map_has_defining_equality(info->bmap, isl_dim_div,
 2447 	info->bmap = isl_basic_map_set_div_expr_constant_num_si_inplace(
 2448 							    info->bmap, div, 0);
 2449 	if (!info->bmap)
 2471 	n = isl_basic_map_dim(info1->bmap, isl_dim_div);
 2475 		known = isl_basic_map_div_is_known(info1->bmap, i);
 2477 			known = isl_basic_map_div_is_known(info2->bmap, i);
 2483 					    info1->bmap, i, info2->bmap, i);
 2483 					    info1->bmap, i, info2->bmap, i);
 2583 	total = isl_basic_map_total_dim(info1->bmap);
 2584 	ls1 = isl_local_space_wrap(isl_basic_map_get_local_space(info1->bmap));
 2585 	ls2 = isl_local_space_wrap(isl_basic_map_get_local_space(info2->bmap));
 2586 	for (i = 0; i < info1->bmap->n_div; ++i) {
 2593 		if (isl_int_ne(info1->bmap->div[i][0], info2->bmap->div[i][0]))
 2593 		if (isl_int_ne(info1->bmap->div[i][0], info2->bmap->div[i][0]))
 2595 		if (isl_seq_eq(info1->bmap->div[i] + 1,
 2596 				info2->bmap->div[i] + 1, 1 + total))
 2613 	if (i < info1->bmap->n_div)
 2649 	if (!info1->bmap || !info2->bmap)
 2649 	if (!info1->bmap || !info2->bmap)
 2652 	if (info1->bmap->n_div != info2->bmap->n_div)
 2652 	if (info1->bmap->n_div != info2->bmap->n_div)
 2654 	if (info1->bmap->n_div == 0)
 2660 	bmap1 = isl_basic_map_copy(info1->bmap);
 2661 	bmap2 = isl_basic_map_copy(info2->bmap);
 2777 	o_div = isl_basic_map_offset(info->bmap, isl_dim_div) - 1;
 2785 			info->bmap = isl_basic_map_extend_constraints(
 2786 						info->bmap, 0, 2);
 2787 			if (isl_basic_map_add_div_constraints(info->bmap,
 2793 			info->bmap = isl_basic_map_add_ineq(info->bmap,
 2793 			info->bmap = isl_basic_map_add_ineq(info->bmap,
 2797 			info->bmap = isl_basic_map_add_ineq(info->bmap,
 2797 			info->bmap = isl_basic_map_add_ineq(info->bmap,
 2801 		if (copy_ineq(info->tab, info->bmap) < 0)
 2856 	if (info->bmap->n_eq + info->bmap->n_ineq != info->tab->n_con)
 2856 	if (info->bmap->n_eq + info->bmap->n_ineq != info->tab->n_con)
 2877 	isl_basic_map_free(info->bmap);
 2878 	info->bmap = bmap;
 2893 		info->bmap = isl_basic_map_cow(info->bmap);
 2893 		info->bmap = isl_basic_map_cow(info->bmap);
 2894 		if (isl_basic_map_free_inequality(info->bmap, 2 * n) < 0)
 2900 	n_eq = info->bmap->n_eq;
 3010 	known = isl_basic_map_divs_known(info[j].bmap);
 3017 	bmap_i = isl_basic_map_copy(info[i].bmap);
 3030 		isl_basic_map_free(info[i].bmap);
 3031 		info[i].bmap = bmap_i;
 3080 	info_local.bmap = bmap;
 3154 	div_j = isl_basic_map_get_divs(info[j].bmap);
 3215 	if (info[j].bmap->n_eq == 0)
 3217 	if (info[i].bmap->n_div == 0)
 3220 	hull_i = isl_basic_map_copy(info[i].bmap);
 3222 	hull_j = isl_basic_map_copy(info[j].bmap);
 3237 	bmap_i = isl_basic_map_copy(info[i].bmap);
 3242 	if (bmap_i->n_div > info[j].bmap->n_div) {
 3274 	if (info[i].bmap->n_div < info[j].bmap->n_div)
 3274 	if (info[i].bmap->n_div < info[j].bmap->n_div)
 3275 		change = coalesce_after_aligning_divs(info[i].bmap, i, j, info);
 3279 	if (info[j].bmap->n_div < info[i].bmap->n_div)
 3279 	if (info[j].bmap->n_div < info[i].bmap->n_div)
 3280 		change = coalesce_after_aligning_divs(info[j].bmap, j, i, info);
 3417 	space = isl_basic_map_get_space(info->bmap);
 3418 	info->bmap = isl_basic_map_cow(info->bmap);
 3418 	info->bmap = isl_basic_map_cow(info->bmap);
 3419 	info->bmap = isl_basic_map_extend_space(info->bmap, space,
 3419 	info->bmap = isl_basic_map_extend_space(info->bmap, space,
 3421 	if (!info->bmap)
 3438 		d = isl_basic_map_alloc_div(info->bmap);
 3441 		info->bmap = isl_basic_map_mark_div_unknown(info->bmap, d);
 3441 		info->bmap = isl_basic_map_mark_div_unknown(info->bmap, d);
 3442 		if (!info->bmap)
 3445 			isl_basic_map_swap_div(info->bmap, j - 1, j);
 3550 	bmap_j = isl_basic_map_copy(info[j].bmap);
 3562 		isl_basic_map_free(info[j].bmap);
 3563 		info[j].bmap = bmap_j;
 3598 	n_div_i = isl_basic_map_dim(info[i].bmap, isl_dim_div);
 3599 	n_div_j = isl_basic_map_dim(info[j].bmap, isl_dim_div);
 3602 	if (info[j].bmap->n_eq == 0)
 3605 	hull_i = isl_basic_map_copy(info[i].bmap);
 3607 	hull_j = isl_basic_map_copy(info[j].bmap);
 3622 	list = set_up_substitutions(info[i].bmap, info[j].bmap, hull_j);
 3622 	list = set_up_substitutions(info[i].bmap, info[j].bmap, hull_j);
 3651 	known = isl_basic_map_divs_known(info[i].bmap);
 3654 	known = isl_basic_map_divs_known(info[j].bmap);
 3657 	nested = has_nested_div(info[i].bmap);
 3660 	nested = has_nested_div(info[j].bmap);
 3704 	same = same_divs(info[i].bmap, info[j].bmap);
 3704 	same = same_divs(info[i].bmap, info[j].bmap);
 3710 	ctx = isl_basic_map_get_ctx(info[i].bmap);
 3712 	if (!preserve && info[i].bmap->n_div == info[j].bmap->n_div) {
 3712 	if (!preserve && info[i].bmap->n_div == info[j].bmap->n_div) {
 3834 		info[i].bmap = isl_basic_map_update_from_tab(info[i].bmap,
 3834 		info[i].bmap = isl_basic_map_update_from_tab(info[i].bmap,
 3836 		info[i].bmap = isl_basic_map_gauss(info[i].bmap, NULL);
 3836 		info[i].bmap = isl_basic_map_gauss(info[i].bmap, NULL);
 3838 			info[i].bmap = isl_basic_map_simplify(info[i].bmap);
 3838 			info[i].bmap = isl_basic_map_simplify(info[i].bmap);
 3839 		info[i].bmap = isl_basic_map_finalize(info[i].bmap);
 3839 		info[i].bmap = isl_basic_map_finalize(info[i].bmap);
 3840 		if (!info[i].bmap)
 3842 		ISL_F_SET(info[i].bmap, ISL_BASIC_MAP_NO_IMPLICIT);
 3843 		ISL_F_SET(info[i].bmap, ISL_BASIC_MAP_NO_REDUNDANT);
 3845 		map->p[i] = info[i].bmap;
 3846 		info[i].bmap = NULL;
 3902 		info[i].bmap = isl_basic_map_copy(map->p[i]);
 3903 		info[i].tab = isl_tab_from_basic_map(info[i].bmap, 0);
 3906 		if (!ISL_F_ISSET(info[i].bmap, ISL_BASIC_MAP_NO_IMPLICIT))
 3909 		info[i].bmap = isl_tab_make_equalities_explicit(info[i].tab,
 3910 								info[i].bmap);
 3911 		if (!info[i].bmap)
 3913 		if (!ISL_F_ISSET(info[i].bmap, ISL_BASIC_MAP_NO_REDUNDANT))