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

References

tools/polly/lib/External/isl/isl_fold.c
  353 	if (qp->div->n_row > 0)
tools/polly/lib/External/isl/isl_output.c
 1826 	p = upoly_print(qp->upoly, qp->dim, qp->div, p);
 1874 		p = upoly_print(qp->upoly, space, qp->div, p);
tools/polly/lib/External/isl/isl_polynomial.c
  463 		return qp->div->n_row;
 1150 	qp->div = isl_mat_alloc(dim->ctx, n_div, 1 + 1 + total + n_div);
 1151 	if (!qp->div)
 1181 	dup = isl_qpolynomial_alloc(isl_space_copy(qp->dim), qp->div->n_row,
 1185 	isl_mat_free(dup->div);
 1186 	dup->div = isl_mat_copy(qp->div);
 1186 	dup->div = isl_mat_copy(qp->div);
 1187 	if (!dup->div)
 1217 	isl_mat_free(qp->div);
 1351 	if (qp->div->n_row <= 1)
 1356 	array = isl_alloc_array(qp->div->ctx, struct isl_div_sort_info,
 1357 				qp->div->n_row);
 1358 	pos = isl_alloc_array(qp->div->ctx, int, qp->div->n_row);
 1358 	pos = isl_alloc_array(qp->div->ctx, int, qp->div->n_row);
 1359 	at = isl_alloc_array(qp->div->ctx, int, qp->div->n_row);
 1359 	at = isl_alloc_array(qp->div->ctx, int, qp->div->n_row);
 1360 	len = qp->div->n_col - 2;
 1361 	reordering = isl_alloc_array(qp->div->ctx, int, len);
 1365 	for (i = 0; i < qp->div->n_row; ++i) {
 1366 		array[i].div = qp->div;
 1372 	qsort(array, qp->div->n_row, sizeof(struct isl_div_sort_info),
 1378 	for (i = 0; i < qp->div->n_row; ++i) {
 1381 		qp->div = isl_mat_swap_rows(qp->div, i, pos[array[i].row]);
 1381 		qp->div = isl_mat_swap_rows(qp->div, i, pos[array[i].row]);
 1391 		    isl_seq_eq(qp->div->row[i - skip - 1],
 1392 			       qp->div->row[i - skip], qp->div->n_col)) {
 1392 			       qp->div->row[i - skip], qp->div->n_col)) {
 1393 			qp->div = isl_mat_drop_rows(qp->div, i - skip, 1);
 1393 			qp->div = isl_mat_drop_rows(qp->div, i - skip, 1);
 1394 			isl_mat_col_add(qp->div, 2 + div_pos + i - skip - 1,
 1396 			qp->div = isl_mat_drop_cols(qp->div,
 1396 			qp->div = isl_mat_drop_cols(qp->div,
 1405 	if (!qp->upoly || !qp->div)
 1476 	isl_assert(qp1->div->ctx, qp1->div->n_row >= qp2->div->n_row &&
 1476 	isl_assert(qp1->div->ctx, qp1->div->n_row >= qp2->div->n_row &&
 1476 	isl_assert(qp1->div->ctx, qp1->div->n_row >= qp2->div->n_row &&
 1477 				qp1->div->n_col >= qp2->div->n_col, goto error);
 1477 				qp1->div->n_col >= qp2->div->n_col, goto error);
 1479 	n_div1 = qp1->div->n_row;
 1480 	n_div2 = qp2->div->n_row;
 1481 	exp1 = isl_alloc_array(qp1->div->ctx, int, n_div1);
 1482 	exp2 = isl_alloc_array(qp2->div->ctx, int, n_div2);
 1486 	div = isl_merge_divs(qp1->div, qp2->div, exp1, exp2);
 1486 	div = isl_merge_divs(qp1->div, qp2->div, exp1, exp2);
 1490 	isl_mat_free(qp1->div);
 1491 	qp1->div = isl_mat_copy(div);
 1492 	isl_mat_free(qp2->div);
 1493 	qp2->div = isl_mat_copy(div);
 1525 	if (qp1->div->n_row < qp2->div->n_row)
 1525 	if (qp1->div->n_row < qp2->div->n_row)
 1529 	compatible = compatible_divs(qp1->div, qp2->div);
 1529 	compatible = compatible_divs(qp1->div, qp2->div);
 1700 	if (qp1->div->n_row < qp2->div->n_row)
 1700 	if (qp1->div->n_row < qp2->div->n_row)
 1704 	compatible = compatible_divs(qp1->div, qp2->div);
 1704 	compatible = compatible_divs(qp1->div, qp2->div);
 1915 	if (qp->div->n_row > 0)
 1983 	aff = isl_vec_alloc(qp->div->ctx, 2 + d + qp->div->n_row);
 1983 	aff = isl_vec_alloc(qp->div->ctx, 2 + d + qp->div->n_row);
 1987 	isl_seq_clr(aff->el + 1, 1 + d + qp->div->n_row);
 2020 	cmp = isl_local_cmp(qp1->div, qp2->div);
 2020 	cmp = isl_local_cmp(qp1->div, qp2->div);
 2046 	equal = isl_mat_is_equal(qp1->div, qp2->div);
 2046 	equal = isl_mat_is_equal(qp1->div, qp2->div);
 2187 	isl_ctx *ctx = qp->div->ctx;
 2188 	unsigned total = qp->div->n_col - 2;
 2190 	isl_seq_gcd(qp->div->row[div] + 2, total, &ctx->normalize_gcd);
 2192 		    ctx->normalize_gcd, qp->div->row[div][0]);
 2196 	isl_seq_scale_down(qp->div->row[div] + 2, qp->div->row[div] + 2,
 2196 	isl_seq_scale_down(qp->div->row[div] + 2, qp->div->row[div] + 2,
 2198 	isl_int_divexact(qp->div->row[div][0], qp->div->row[div][0],
 2198 	isl_int_divexact(qp->div->row[div][0], qp->div->row[div][0],
 2200 	isl_int_fdiv_q(qp->div->row[div][1], qp->div->row[div][1],
 2200 	isl_int_fdiv_q(qp->div->row[div][1], qp->div->row[div][1],
 2228 	reordering = isl_alloc_array(qp->dim->ctx, int, total + qp->div->n_row);
 2233 	for (i = total + div + 1; i < total + qp->div->n_row; ++i)
 2235 	qp->div = isl_mat_drop_rows(qp->div, div, 1);
 2235 	qp->div = isl_mat_drop_rows(qp->div, div, 1);
 2236 	qp->div = isl_mat_drop_cols(qp->div, 2 + total + div, 1);
 2236 	qp->div = isl_mat_drop_cols(qp->div, 2 + total + div, 1);
 2240 	if (!qp->upoly || !qp->div)
 2265 	for (i = 0; qp && i < qp->div->n_row; ++i) {
 2266 		if (!isl_int_is_one(qp->div->row[i][0]))
 2268 		for (j = i + 1; j < qp->div->n_row; ++j) {
 2269 			if (isl_int_is_zero(qp->div->row[j][2 + total + i]))
 2271 			isl_seq_combine(qp->div->row[j] + 1,
 2272 				qp->div->ctx->one, qp->div->row[j] + 1,
 2272 				qp->div->ctx->one, qp->div->row[j] + 1,
 2273 				qp->div->row[j][2 + total + i],
 2274 				qp->div->row[i] + 1, 1 + total + i);
 2275 			isl_int_set_si(qp->div->row[j][2 + total + i], 0);
 2278 		s = isl_upoly_from_affine(qp->dim->ctx, qp->div->row[i] + 1,
 2279 					qp->div->row[i][0], qp->div->n_col - 1);
 2279 					qp->div->row[i][0], qp->div->n_col - 1);
 2301 	unsigned total = qp->div->n_col - qp->div->n_row - 2;
 2301 	unsigned total = qp->div->n_col - qp->div->n_row - 2;
 2305 		if (isl_int_is_nonneg(qp->div->row[div][1 + i]) &&
 2306 		    isl_int_lt(qp->div->row[div][1 + i], qp->div->row[div][0]))
 2306 		    isl_int_lt(qp->div->row[div][1 + i], qp->div->row[div][0]))
 2308 		isl_int_fdiv_q(v, qp->div->row[div][1 + i], qp->div->row[div][0]);
 2308 		isl_int_fdiv_q(v, qp->div->row[div][1 + i], qp->div->row[div][0]);
 2309 		isl_int_fdiv_r(qp->div->row[div][1 + i],
 2310 				qp->div->row[div][1 + i], qp->div->row[div][0]);
 2310 				qp->div->row[div][1 + i], qp->div->row[div][0]);
 2312 		for (j = div + 1; j < qp->div->n_row; ++j) {
 2313 			if (isl_int_is_zero(qp->div->row[j][2 + total + div]))
 2315 			isl_int_addmul(qp->div->row[j][1 + i],
 2316 					v, qp->div->row[j][2 + total + div]);
 2357 	unsigned total = qp->div->n_col - qp->div->n_row - 2;
 2357 	unsigned total = qp->div->n_col - qp->div->n_row - 2;
 2359 	isl_seq_neg(qp->div->row[div] + 1,
 2360 		    qp->div->row[div] + 1, qp->div->n_col - 1);
 2360 		    qp->div->row[div] + 1, qp->div->n_col - 1);
 2361 	isl_int_sub_ui(qp->div->row[div][1], qp->div->row[div][1], 1);
 2361 	isl_int_sub_ui(qp->div->row[div][1], qp->div->row[div][1], 1);
 2362 	isl_int_add(qp->div->row[div][1],
 2363 		    qp->div->row[div][1], qp->div->row[div][0]);
 2363 		    qp->div->row[div][1], qp->div->row[div][0]);
 2365 	isl_mat_col_mul(qp->div, 2 + total + div,
 2366 			qp->div->ctx->negone, 2 + total + div);
 2403 	for (i = 0; i < qp->div->n_row; ++i) {
 2406 		if (needs_invert(qp->div, i)) {
 2521 		for (j = 0; j < qp->div->n_row; ++j) {
 2522 			if (isl_int_is_zero(qp->div->row[j][2 + i]))
 2588 	if (qp->div->n_row == 0)
 2592 	len = qp->div->n_col - 2;
 2601 	for (i = qp->div->n_row - 1; i >= 0; --i) {
 2607 			if (isl_int_is_zero(qp->div->row[i][2 + d + j]))
 2619 	reordering = isl_alloc_array(qp->div->ctx, int, len);
 2627 	n_div = qp->div->n_row;
 2630 			qp->div = isl_mat_drop_rows(qp->div, i - skip, 1);
 2630 			qp->div = isl_mat_drop_rows(qp->div, i - skip, 1);
 2631 			qp->div = isl_mat_drop_cols(qp->div,
 2631 			qp->div = isl_mat_drop_cols(qp->div,
 2640 	if (!qp->upoly || !qp->div)
 2741 	qp->div = isl_mat_drop_cols(qp->div, 2 + first, n);
 2741 	qp->div = isl_mat_drop_cols(qp->div, 2 + first, n);
 2742 	if (!qp->div)
 2799 	qp->div = isl_mat_cow(qp->div);
 2799 	qp->div = isl_mat_cow(qp->div);
 2800 	if (!qp->div)
 2811 		for (k = 0; k < qp->div->n_row; ++k) {
 2812 			if (isl_int_is_zero(qp->div->row[k][1 + j]))
 2814 			isl_seq_elim(qp->div->row[k] + 1, eq->eq[i], j, total,
 2815 					&qp->div->row[k][0]);
 2853 	if (qp->div->n_row > 0)
 2854 		eq = isl_basic_set_add_dims(eq, isl_dim_set, qp->div->n_row);
 2900 	if (qp->div->n_row > 0) {
 2903 					    qp->div->n_row);
 2905 		bset = add_div_constraints(bset, isl_mat_copy(qp->div));
 3133 	ext = isl_local_extend_point_vec(qp->div, isl_vec_copy(pnt->vec));
 3171 		isl_die(qp->div->ctx, isl_error_invalid,
 3183 	isl_assert(qp->div->ctx, first <= isl_space_dim(qp->dim, type),
 3188 	qp->div = isl_mat_insert_zero_cols(qp->div, 2 + g_pos, n);
 3188 	qp->div = isl_mat_insert_zero_cols(qp->div, 2 + g_pos, n);
 3189 	if (!qp->div)
 3192 	total = qp->div->n_col - 2;
 3195 		exp = isl_alloc_array(qp->div->ctx, int, total - g_pos);
 3308 	qp->div = isl_mat_move_cols(qp->div, 2 + g_dst_pos, 2 + g_src_pos, n);
 3308 	qp->div = isl_mat_move_cols(qp->div, 2 + g_dst_pos, 2 + g_src_pos, n);
 3309 	if (!qp->div)
 3316 				qp->div->n_col - 2, g_dst_pos, g_src_pos, n);
 3368 	isl_mat_free(qp->div);
 3369 	qp->div = isl_mat_copy(aff->ls->div);
 3370 	qp->div = isl_mat_cow(qp->div);
 3370 	qp->div = isl_mat_cow(qp->div);
 3371 	if (!qp->div)
 3454 	isl_assert(qp->dim->ctx, qp->div->n_row == 0, goto error);
 3456 		isl_assert(qp->dim->ctx, subs[i]->div->n_row == 0, goto error);
 3495 	if (qp->div->n_row == 0)
 3499 	div = isl_mat_copy(qp->div);
 3501 	dim = isl_space_add_dims(dim, isl_dim_set, qp->div->n_row);
 3504 	bset = isl_basic_set_add_dims(bset, isl_dim_set, qp->div->n_row);
 3621 		isl_die(qp->div->ctx, isl_error_invalid,
 3627 	isl_assert(qp->div->ctx, t_pos < isl_space_dim(qp->dim, type),
 3633 	c = isl_qpolynomial_alloc(isl_space_copy(qp->dim), qp->div->n_row, up);
 3636 	isl_mat_free(c->div);
 3637 	c->div = isl_mat_copy(qp->div);
 3637 	c->div = isl_mat_copy(qp->div);
 3638 	if (!c->div)
 3955 	term = isl_term_alloc(isl_space_copy(qp->dim), isl_mat_copy(qp->div));
 3988 	isl_mat_free(qp->div);
 3989 	qp->div = isl_mat_copy(term->div);
 3990 	if (!qp->div)
 4023 	if (qp->div->n_row) {
 4026 		exp = isl_alloc_array(qp->div->ctx, int, qp->div->n_row);
 4026 		exp = isl_alloc_array(qp->div->ctx, int, qp->div->n_row);
 4029 		for (i = 0; i < qp->div->n_row; ++i)
 4036 	qp->div = isl_mat_insert_cols(qp->div, 2 + total, extra);
 4036 	qp->div = isl_mat_insert_cols(qp->div, 2 + total, extra);
 4037 	if (!qp->div)
 4039 	for (i = 0; i < qp->div->n_row; ++i)
 4040 		isl_seq_clr(qp->div->row[i] + 2 + total, extra);
 4182 		n_sub += qp->div->n_row;
 4191 		for (i = 0; i < qp->div->n_row; ++i)
 4203 	diag = isl_mat_diag(ctx, qp->div->n_row, morph->inv->row[0][0]);
 4205 	qp->div = isl_mat_product(qp->div, mat);
 4205 	qp->div = isl_mat_product(qp->div, mat);
 4209 	if (!qp->upoly || !qp->div || !qp->dim)
 4240 	r = isl_reordering_extend(r, qp->div->n_row);
 4244 	qp->div = isl_local_reorder(qp->div, isl_reordering_copy(r));
 4244 	qp->div = isl_local_reorder(qp->div, isl_reordering_copy(r));
 4245 	if (!qp->div)
 4322 	isl_seq_cpy(bset->ineq[k], qp->div->row[div] + 1, 1 + total);
 4323 	isl_int_submul(bset->ineq[k][0], v, qp->div->row[div][0]);
 4328 	isl_seq_neg(bset->ineq[k], qp->div->row[div] + 1, 1 + total);
 4329 	isl_int_addmul(bset->ineq[k][0], v, qp->div->row[div][0]);
 4330 	isl_int_add(bset->ineq[k][0], bset->ineq[k][0], qp->div->row[div][0]);
 4365 	for (i = div + 1; i < qp->div->n_row; ++i) {
 4366 		if (isl_int_is_zero(qp->div->row[i][2 + total + div]))
 4368 		isl_int_addmul(qp->div->row[i][1],
 4369 				qp->div->row[i][2 + total + div], v);
 4370 		isl_int_set_si(qp->div->row[i][2 + total + div], 0);
 4428 	if (qp->div->n_row == 0) {
 4437 	for (i = 0; i < qp->div->n_row; ++i) {
 4440 		if (isl_seq_first_non_zero(qp->div->row[i] + 2 + total,
 4441 						qp->div->n_row) != -1)
 4444 		lp_res = isl_set_solve_lp(set, 0, qp->div->row[i] + 1,
 4450 		isl_int_fdiv_q(min, min, qp->div->row[i][0]);
 4452 		lp_res = isl_set_solve_lp(set, 1, qp->div->row[i] + 1,
 4458 		isl_int_fdiv_q(max, max, qp->div->row[i][0]);
 4467 	if (i < qp->div->n_row) {
 4671 	if (qp->div->n_row == 0)
 4678 	for (i = qp->div->n_row - 1; i >= 0; --i) {
 4680 			isl_int_sub(qp->div->row[i][1],
 4681 				    qp->div->row[i][1], qp->div->row[i][0]);
 4681 				    qp->div->row[i][1], qp->div->row[i][0]);
 4682 			isl_int_add_ui(qp->div->row[i][1],
 4683 				       qp->div->row[i][1], 1);
 4685 		s = isl_upoly_from_affine(qp->dim->ctx, qp->div->row[i] + 1,
 4686 					qp->div->row[i][0], qp->div->n_col - 1);
 4686 					qp->div->row[i][0], qp->div->n_col - 1);
 4751 	qp->div = isl_mat_cow(qp->div);
 4751 	qp->div = isl_mat_cow(qp->div);
 4752 	if (!qp->div)
 4756 	v = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1);
 4756 	v = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1);
 4758 	for (i = 0; i < qp->div->n_row; ++i) {
 4759 		isl_int *row = qp->div->row[i];
 4785 		for (j = i + 1; j < qp->div->n_row; ++j) {
 4786 			if (isl_int_is_zero(qp->div->row[j][2 + total + i]))
 4788 			isl_seq_combine(qp->div->row[j] + 1,
 4789 				qp->div->ctx->one, qp->div->row[j] + 1,
 4789 				qp->div->ctx->one, qp->div->row[j] + 1,
 4790 				qp->div->row[j][2 + total + i], v->el, v->size);
 4794 					qp->div->ctx->one, v->size);
 4875 		if (pwqp->p[i].qp->div->n_row == 0) {
 4933 	n_div = qp->div->n_row;
 4940 		isl_seq_cpy(bmap->div[k], qp->div->row[i], qp->div->n_col);
 4940 		isl_seq_cpy(bmap->div[k], qp->div->row[i], qp->div->n_col);
 4941 		isl_int_set_si(bmap->div[k][qp->div->n_col], 0);