76 unsigned row,
unsigned col)
80 if (
isl_int_eq(bset1->eq[row][col], bset2->eq[row][col]))
85 isl_int_lcm(
m, bset1->eq[row][col], bset2->eq[row][col]);
103 for (r = row; r < bset->n_eq; ++r)
104 bset->eq[r] = bset->eq[r+1];
105 bset->eq[bset->n_eq] =
t;
119 unsigned row,
unsigned col)
132 for (r = 0; r < row; ++r) {
139 b, bset1->eq[row], 1 +
total);
160 unsigned row,
unsigned col)
166 for (
t = row-1;
t >= 0; --
t)
179 for (i = 0; i <
t; ++i) {
211 if (dim < 0 || !bset2)
217 for (col =
total-1; col >= 0; --col) {
218 int is_zero1 = row >= bset1->n_eq ||
220 int is_zero2 = row >= bset2->n_eq ||
222 if (!is_zero1 && !is_zero2) {
225 }
else if (!is_zero1 && is_zero2) {
228 }
else if (is_zero1 && !is_zero2) {
241 isl_assert(bset1->ctx, row == bset1->n_eq,
goto error);
285 up ? ctx->
one : ctx->
negone, eq + 1, dim);
333 for (i = 0; i < bset->n_eq; ++i)
336 for (i = 0; i < bset->n_ineq; ++i)
369 if (!sample || dim < 0)
372 for (i = 0; i < dim; ++i) {
373 for (up = 0; up <= 1; ++up) {
435 for (i = 0; i < dim; ++i) {
438 for (j = 0; j <
hull->n_eq; ++j) {
442 if (sample->
size > 0)
448 if (sample->
size > 0)
513 if (bset->sample && bset->sample->size == 1 + dim) {
548 if (sample->
size == 0) {
594 for (i = 0; i < dim; ++i) {
601 vec->size - 1, &bset->eq[k][0]);
632 if (!tab || !tab_cone)
662 for (j = tab->
n_outside + 1; j < tab->n_sample; ++j) {
683 for (j = 0; j <
hull->n_eq; ++j) {
739 if (!bset ||
total < 0)
760 if (bset && bset->sample && bset->sample->size == 1 +
total)
771 if (sample && sample->
size > 0)
778 hull->sample = sample;
820 if (
cone->n_eq == 0) {
879 if (sample && sample->
size > 0)
886 hull->sample = sample;
912 if (bmap->n_ineq == 0)
932 for (i = 0; i <
hull->n_eq; ++i) {
1038 for (i = 1; i <
M->n_row; ++i) {
1050 isl_seq_clr(bmap->eq[k] +
M->n_col, bmap->n_div - n_known);
1110 for (n_known = 0; n_known < bmap->n_div; ++n_known)
1116 for (
n = 0;
n < bmap->n_eq; ++
n)
1118 bmap->n_div - n_known) == -1)
1124 n_col = bmap->n_div - n_known;
1162 for (i = 0; i <
map->n; ++i) {
static RegisterPass< ScopPrinterWrapperPass > M("dot-scops", "Polly - Print Scops of function")
static __isl_give isl_basic_set * bset_from_bmap(__isl_take isl_basic_map *bmap)
static __isl_give isl_basic_map * bset_to_bmap(__isl_take isl_basic_set *bset)
#define isl_assert(ctx, test, code)
#define ISL_F_ISSET(p, f)
void GMPZAPI() gcd(mp_int rop, mp_int op1, mp_int op2)
static void set_common_multiple(struct isl_basic_set *bset1, struct isl_basic_set *bset2, unsigned row, unsigned col)
static void delete_row(__isl_keep isl_basic_set *bset, unsigned row)
static __isl_give isl_basic_map * replace_map_by_empty_basic_map(__isl_take isl_map *map)
static isl_bool transform_column(__isl_keep isl_basic_set *bset1, __isl_keep isl_basic_set *bset2, unsigned row, unsigned col)
static __isl_give isl_set * isl_set_local_affine_hull(__isl_take isl_set *set)
static __isl_give isl_map * isl_map_local_affine_hull(__isl_take isl_map *map)
static __isl_give isl_vec * outside_point(struct isl_tab *tab, isl_int *eq, int up)
struct isl_tab * isl_tab_detect_equalities(struct isl_tab *tab, struct isl_tab *tab_cone)
static __isl_give isl_basic_set * add_adjacent_points(__isl_take isl_basic_set *hull, __isl_take isl_vec *sample, __isl_keep isl_basic_set *bset)
__isl_give isl_map * isl_map_detect_equalities(__isl_take isl_map *map)
static __isl_give isl_basic_map * add_strides(__isl_take isl_basic_map *bmap, __isl_keep isl_mat *M, int n_known)
static __isl_give isl_basic_set * initial_hull(struct isl_tab *tab, __isl_take isl_vec *vec)
__isl_give isl_basic_set * isl_set_affine_hull(__isl_take isl_set *set)
static __isl_give isl_basic_set * affine_hull(__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
static void adjacent_point(__isl_keep isl_vec *sample, int pos, int up)
__isl_give isl_basic_set * isl_basic_set_detect_equalities(__isl_take isl_basic_set *bset)
static __isl_give isl_basic_set * uset_affine_hull(__isl_take isl_basic_set *bset)
static __isl_give isl_basic_set * extend_affine_hull(struct isl_tab *tab, __isl_take isl_basic_set *hull, __isl_keep isl_basic_set *bset)
__isl_give isl_basic_map * isl_basic_map_detect_equalities(__isl_take isl_basic_map *bmap)
static __isl_give isl_basic_set * equalities_in_underlying_set(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_affine_hull(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_plain_affine_hull(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_set * isl_basic_set_implicit_equalities(__isl_take isl_basic_set *bset)
static __isl_give isl_basic_map * isl_basic_map_make_strides_explicit(__isl_take isl_basic_map *bmap)
static __isl_give isl_basic_set * initialize_hull(__isl_keep isl_basic_set *bset, __isl_take isl_vec *sample)
static isl_stat construct_column(__isl_keep isl_basic_set *bset1, __isl_keep isl_basic_set *bset2, unsigned row, unsigned col)
__isl_give isl_basic_map * isl_map_affine_hull(__isl_take isl_map *map)
__isl_give isl_basic_set * isl_basic_set_recession_cone(__isl_take isl_basic_set *bset)
static __isl_give isl_basic_set * uset_affine_hull_bounded(__isl_take isl_basic_set *bset)
__isl_give isl_basic_set * isl_basic_set_plain_affine_hull(__isl_take isl_basic_set *bset)
__isl_give isl_basic_map * isl_basic_map_implicit_equalities(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_set * isl_basic_set_affine_hull(__isl_take isl_basic_set *bset)
static __isl_give isl_basic_set * affine_hull_with_cone(__isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone)
__isl_give isl_set * isl_set_detect_equalities(__isl_take isl_set *set)
__isl_give isl_basic_set * isl_basic_set_remove_equalities(__isl_take isl_basic_set *bset, __isl_give isl_mat **T, __isl_give isl_mat **T2)
#define isl_int_is_zero(i)
#define isl_int_is_one(i)
#define isl_int_gcd(r, i, j)
#define isl_int_neg(r, i)
#define isl_int_add_ui(r, i, j)
#define isl_int_is_divisible_by(i, j)
#define isl_int_set(r, i)
#define isl_int_lcm(r, i, j)
#define isl_int_divexact(r, i, j)
#define isl_int_set_si(r, i)
#define isl_int_sub_ui(r, i, j)
#define isl_int_sub(r, i, j)
__isl_give isl_basic_map * isl_basic_map_sort_divs(__isl_take isl_basic_map *bmap)
isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset, __isl_keep isl_vec *vec)
isl_size isl_basic_map_var_offset(__isl_keep isl_basic_map *bmap, enum isl_dim_type type)
__isl_give isl_basic_map * isl_basic_map_free_inequality(__isl_take isl_basic_map *bmap, unsigned n)
__isl_give isl_basic_set * isl_basic_set_drop_constraints_involving(__isl_take isl_basic_set *bset, unsigned first, unsigned n)
__isl_give isl_basic_set * isl_basic_set_set_to_empty(__isl_take isl_basic_set *bset)
__isl_give isl_set * isl_map_underlying_set(__isl_take isl_map *map)
__isl_give isl_map * isl_map_inline_foreach_basic_map(__isl_take isl_map *map, __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap))
__isl_give isl_basic_set * isl_basic_set_drop_dims(__isl_take isl_basic_set *bset, unsigned first, unsigned n)
__isl_give isl_map * isl_map_align_divs_internal(__isl_take isl_map *map)
__isl_give isl_set * isl_set_cow(__isl_take isl_set *set)
int isl_basic_set_alloc_equality(__isl_keep isl_basic_set *bset)
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
int isl_basic_map_alloc_div(__isl_keep isl_basic_map *bmap)
isl_stat isl_basic_set_check_no_locals(__isl_keep isl_basic_set *bset)
__isl_give isl_basic_map * isl_basic_map_set_to_empty(__isl_take isl_basic_map *bmap)
__isl_give isl_map * isl_map_cow(__isl_take isl_map *map)
__isl_give isl_basic_set * isl_basic_map_underlying_set(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_cow(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_set * isl_basic_set_cow(__isl_take isl_basic_set *bset)
__isl_give isl_map * isl_map_remove_empty_parts(__isl_take isl_map *map)
int isl_basic_map_alloc_equality(__isl_keep isl_basic_map *bmap)
isl_bool isl_basic_map_contains(__isl_keep isl_basic_map *bmap, __isl_keep isl_vec *vec)
isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_extend(__isl_take isl_basic_map *base, unsigned extra, unsigned n_eq, unsigned n_ineq)
__isl_give isl_basic_map * isl_basic_map_overlying_set(__isl_take isl_basic_set *bset, __isl_take isl_basic_map *like)
__isl_give isl_basic_set * isl_basic_set_alloc(isl_ctx *ctx, unsigned nparam, unsigned dim, unsigned extra, unsigned n_eq, unsigned n_ineq)
__isl_give isl_basic_map * isl_basic_map_simplify(__isl_take isl_basic_map *bmap)
#define ISL_BASIC_MAP_EMPTY
__isl_give isl_basic_set * isl_basic_set_preimage(__isl_take isl_basic_set *bset, __isl_take isl_mat *mat)
__isl_give isl_basic_map * isl_basic_map_finalize(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_gauss(__isl_take isl_basic_map *bmap, int *progress)
#define ISL_BASIC_MAP_ALL_EQUALITIES
#define ISL_BASIC_SET_NO_IMPLICIT
#define ISL_BASIC_MAP_RATIONAL
#define ISL_BASIC_SET_EMPTY
#define ISL_BASIC_MAP_NO_IMPLICIT
__isl_give isl_basic_set * isl_basic_set_gauss(__isl_take isl_basic_set *bset, int *progress)
__isl_give isl_basic_set * isl_basic_set_normalize_constraints(__isl_take isl_basic_set *bset)
__isl_give isl_mat * isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row, unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col)
__isl_give isl_basic_set * isl_basic_set_from_vec(__isl_take isl_vec *vec)
int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, struct isl_tab *tab_cone)
__isl_give isl_vec * isl_tab_sample(struct isl_tab *tab)
static isl_stat transform(isl_ctx *ctx, struct isl_sched_graph *graph, struct isl_sched_node *t_node)
void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1, isl_int m2, isl_int *src2, unsigned len)
void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len, isl_int *prod)
int isl_seq_first_non_zero(isl_int *p, unsigned len)
void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd)
void isl_seq_clr(isl_int *p, unsigned len)
void isl_seq_scale(isl_int *dst, isl_int *src, isl_int m, unsigned len)
void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len)
void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len)
void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len)
void isl_tab_free(struct isl_tab *tab)
int isl_tab_add_sample(struct isl_tab *tab, __isl_take isl_vec *sample)
isl_stat isl_tab_add_eq(struct isl_tab *tab, isl_int *eq)
struct isl_tab_undo * isl_tab_snap(struct isl_tab *tab)
isl_stat isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq)
int isl_tab_detect_implicit_equalities(struct isl_tab *tab)
__isl_give struct isl_tab * isl_tab_from_basic_map(__isl_keep isl_basic_map *bmap, int track)
__isl_give struct isl_tab * isl_tab_from_basic_set(__isl_keep isl_basic_set *bset, int track)
isl_stat isl_tab_rollback(struct isl_tab *tab, struct isl_tab_undo *snap)
int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new)
__isl_give isl_basic_map * isl_basic_map_update_from_tab(__isl_take isl_basic_map *bmap, struct isl_tab *tab)
static __isl_give isl_union_map * total(__isl_take isl_union_map *umap, __isl_give isl_map *(*fn)(__isl_take isl_map *))
__isl_null isl_basic_map * isl_basic_map_free(__isl_take isl_basic_map *bmap)
isl_ctx * isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap)
__isl_export __isl_give isl_space * isl_map_get_space(__isl_keep isl_map *map)
__isl_give isl_map * isl_map_remove_unknown_divs(__isl_take isl_map *map)
__isl_give isl_basic_map * isl_basic_map_empty(__isl_take isl_space *space)
__isl_null isl_map * isl_map_free(__isl_take isl_map *map)
__isl_give isl_basic_map * isl_basic_map_copy(__isl_keep isl_basic_map *bmap)
struct isl_basic_set isl_basic_set
__isl_give isl_mat * isl_mat_copy(__isl_keep isl_mat *mat)
__isl_give isl_mat * isl_mat_insert_zero_rows(__isl_take isl_mat *mat, unsigned row, unsigned n)
__isl_give isl_mat * isl_mat_product(__isl_take isl_mat *left, __isl_take isl_mat *right)
__isl_give isl_mat * isl_mat_left_hermite(__isl_take isl_mat *M, int neg, __isl_give isl_mat **U, __isl_give isl_mat **Q)
__isl_give isl_mat * isl_mat_drop_rows(__isl_take isl_mat *mat, unsigned row, unsigned n)
__isl_give isl_vec * isl_mat_vec_product(__isl_take isl_mat *mat, __isl_take isl_vec *vec)
__isl_give isl_mat * isl_mat_right_inverse(__isl_take isl_mat *mat)
__isl_give isl_mat * isl_mat_lin_to_aff(__isl_take isl_mat *mat)
__isl_null isl_mat * isl_mat_free(__isl_take isl_mat *mat)
__isl_give isl_mat * isl_mat_set_element_si(__isl_take isl_mat *mat, int row, int col, int v)
__isl_give isl_mat * isl_mat_drop_cols(__isl_take isl_mat *mat, unsigned col, unsigned n)
isl_size isl_basic_set_dim(__isl_keep isl_basic_set *bset, enum isl_dim_type type)
__isl_give isl_space * isl_basic_set_get_space(__isl_keep isl_basic_set *bset)
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
isl_bool isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset)
__isl_null isl_set * isl_set_free(__isl_take isl_set *set)
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
__isl_give isl_basic_set * isl_basic_set_universe(__isl_take isl_space *space)
static __isl_give isl_set * set_from_map(__isl_take isl_map *map)
struct isl_basic_map * bmap
static Signature set_to_map
static bool contains(const std::vector< std::string > &v, const std::string &el)
__isl_null isl_vec * isl_vec_free(__isl_take isl_vec *vec)
__isl_give isl_vec * isl_vec_copy(__isl_keep isl_vec *vec)
__isl_give isl_vec * isl_vec_alloc(isl_ctx *ctx, unsigned size)