Update isl to 6be6768e

Besides a couple of interface cleanups, this change also contains a performance
optimization of isl_mat_product that should give us up to almost 6% compiletime
reduction.

llvm-svn: 237616
This commit is contained in:
Tobias Grosser 2015-05-18 21:29:58 +00:00
parent f91cebf7c5
commit 1638f987f1
17 changed files with 108 additions and 166 deletions

View File

@ -3606,6 +3606,7 @@ is already known to be empty.
int isl_basic_set_is_universe(__isl_keep isl_basic_set *bset);
int isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap);
int isl_set_plain_is_universe(__isl_keep isl_set *set);
int isl_map_plain_is_universe(__isl_keep isl_map *map);
=item * Single-valuedness
@ -3815,6 +3816,10 @@ Check whether the given expression is a constant.
int isl_aff_is_nan(__isl_keep isl_aff *aff);
int isl_pw_aff_involves_nan(__isl_keep isl_pw_aff *pa);
#include <isl/polynomial.h>
int isl_qpolynomial_fold_is_nan(
__isl_keep isl_qpolynomial_fold *fold);
Check whether the given expression is equal to or involves NaN.
#include <isl/aff.h>
@ -3841,6 +3846,9 @@ return true if the objects are not the same.
int isl_basic_set_plain_is_equal(
__isl_keep isl_basic_set *bset1,
__isl_keep isl_basic_set *bset2);
int isl_basic_set_is_equal(
__isl_keep isl_basic_set *bset1,
__isl_keep isl_basic_set *bset2);
int isl_set_plain_is_equal(__isl_keep isl_set *set1,
__isl_keep isl_set *set2);
int isl_set_is_equal(__isl_keep isl_set *set1,

View File

@ -119,7 +119,6 @@ struct isl_basic_map *isl_basic_map_alloc(struct isl_ctx *ctx,
unsigned nparam, unsigned in, unsigned out, unsigned extra,
unsigned n_eq, unsigned n_ineq);
__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_space *dim);
struct isl_basic_map *isl_basic_map_identity_like(struct isl_basic_map *model);
struct isl_basic_map *isl_basic_map_finalize(struct isl_basic_map *bmap);
__isl_null isl_basic_map *isl_basic_map_free(__isl_take isl_basic_map *bmap);
__isl_give isl_basic_map *isl_basic_map_copy(__isl_keep isl_basic_map *bmap);
@ -135,12 +134,8 @@ __isl_give isl_basic_map *isl_basic_map_less_at(__isl_take isl_space *dim,
__isl_give isl_basic_map *isl_basic_map_more_at(__isl_take isl_space *dim,
unsigned pos);
__isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_space *dim);
struct isl_basic_map *isl_basic_map_empty_like(struct isl_basic_map *model);
struct isl_basic_map *isl_basic_map_empty_like_map(struct isl_map *model);
__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_space *dim);
__isl_give isl_basic_map *isl_basic_map_nat_universe(__isl_take isl_space *dim);
__isl_give isl_basic_map *isl_basic_map_universe_like(
__isl_keep isl_basic_map *bmap);
__isl_give isl_basic_map *isl_basic_map_remove_redundancies(
__isl_take isl_basic_map *bmap);
__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map);
@ -309,14 +304,10 @@ struct isl_map *isl_map_alloc(struct isl_ctx *ctx,
__isl_give isl_map *isl_map_universe(__isl_take isl_space *dim);
__isl_give isl_map *isl_map_nat_universe(__isl_take isl_space *dim);
__isl_give isl_map *isl_map_empty(__isl_take isl_space *dim);
struct isl_map *isl_map_empty_like(struct isl_map *model);
struct isl_map *isl_map_empty_like_basic_map(struct isl_basic_map *model);
struct isl_map *isl_map_dup(struct isl_map *map);
__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
__isl_take isl_basic_map *bmap);
__isl_give isl_map *isl_map_identity(__isl_take isl_space *dim);
struct isl_map *isl_map_identity_like(struct isl_map *model);
struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model);
__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_space *dim, unsigned n);
__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_space *dim, unsigned n);
__isl_give isl_map *isl_map_lex_lt(__isl_take isl_space *set_dim);

View File

@ -279,6 +279,7 @@ __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy(
void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold);
int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold);
int isl_qpolynomial_fold_is_nan(__isl_keep isl_qpolynomial_fold *fold);
int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1,
__isl_keep isl_qpolynomial_fold *fold2);

View File

@ -101,12 +101,8 @@ __isl_null isl_basic_set *isl_basic_set_free(__isl_take isl_basic_set *bset);
__isl_give isl_basic_set *isl_basic_set_copy(__isl_keep isl_basic_set *bset);
struct isl_basic_set *isl_basic_set_dup(struct isl_basic_set *bset);
__isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_space *dim);
struct isl_basic_set *isl_basic_set_empty_like(struct isl_basic_set *bset);
__isl_give isl_basic_set *isl_basic_set_universe(__isl_take isl_space *dim);
__isl_give isl_basic_set *isl_basic_set_nat_universe(__isl_take isl_space *dim);
struct isl_basic_set *isl_basic_set_universe_like(struct isl_basic_set *bset);
__isl_give isl_basic_set *isl_basic_set_universe_like_set(
__isl_keep isl_set *model);
__isl_give isl_basic_set *isl_basic_set_positive_orthant(
__isl_take isl_space *space);
void isl_basic_set_print_internal(__isl_keep isl_basic_set *bset,
@ -254,10 +250,8 @@ struct isl_set *isl_set_alloc(struct isl_ctx *ctx,
struct isl_set *isl_set_extend(struct isl_set *base,
unsigned nparam, unsigned dim);
__isl_give isl_set *isl_set_empty(__isl_take isl_space *dim);
struct isl_set *isl_set_empty_like(struct isl_set *set);
__isl_give isl_set *isl_set_universe(__isl_take isl_space *dim);
__isl_give isl_set *isl_set_nat_universe(__isl_take isl_space *dim);
__isl_give isl_set *isl_set_universe_like(__isl_keep isl_set *model);
__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set,
__isl_take isl_basic_set *bset);
struct isl_set *isl_set_finalize(struct isl_set *set);

View File

@ -1005,11 +1005,11 @@ static struct isl_basic_set *uset_affine_hull(struct isl_basic_set *bset)
if (!cone)
goto error;
if (cone->n_eq == 0) {
struct isl_basic_set *hull;
isl_space *space;
space = isl_basic_set_get_space(bset);
isl_basic_set_free(cone);
hull = isl_basic_set_universe_like(bset);
isl_basic_set_free(bset);
return hull;
return isl_basic_set_universe(space);
}
if (cone->n_eq < isl_basic_set_total_dim(cone))
@ -1346,6 +1346,18 @@ static __isl_give isl_set *isl_set_local_affine_hull(__isl_take isl_set *set)
return isl_map_local_affine_hull(set);
}
/* Return an empty basic map living in the same space as "map".
*/
static __isl_give isl_basic_map *replace_map_by_empty_basic_map(
__isl_take isl_map *map)
{
isl_space *space;
space = isl_map_get_space(map);
isl_map_free(map);
return isl_basic_map_empty(space);
}
/* Compute the affine hull of "map".
*
* We first compute the affine hull of each basic map separately.
@ -1381,11 +1393,8 @@ __isl_give isl_basic_map *isl_map_affine_hull(__isl_take isl_map *map)
if (!map)
return NULL;
if (map->n == 0) {
hull = isl_basic_map_empty_like_map(map);
isl_map_free(map);
return hull;
}
if (map->n == 0)
return replace_map_by_empty_basic_map(map);
model = isl_basic_map_copy(map->p[0]);
set = isl_map_underlying_set(map);

View File

@ -2576,10 +2576,9 @@ static int foreach_iteration(__isl_take isl_set *domain,
lower = find_unroll_lower_bound(build, domain, depth, bmap, &n);
if (!lower)
domain = isl_set_free(domain);
if (init && init(n, user) < 0)
domain = isl_set_free(domain);
n = -1;
else if (init && init(n, user) < 0)
n = -1;
for (i = 0; i < n; ++i) {
isl_set *set;
isl_basic_set *bset;
@ -2600,7 +2599,7 @@ static int foreach_iteration(__isl_take isl_set *domain,
isl_set_free(domain);
isl_basic_map_free(bmap);
return i < n ? -1 : 0;
return n < 0 || i < n ? -1 : 0;
}
/* Data structure for storing the results and the intermediate objects
@ -3263,7 +3262,7 @@ error:
/* Generate code for a single component, after shifting (if any)
* has been applied, in case the schedule was specified as a schedule tree.
* In particular, do so for the specified subset of the schedule domsain.
* In particular, do so for the specified subset of the schedule domain.
*/
static __isl_give isl_ast_graft_list *generate_shifted_component_tree_part(
__isl_keep isl_union_map *executed, __isl_take isl_set *domain,
@ -3295,8 +3294,8 @@ error:
/* Generate code for a single component, after shifting (if any)
* has been applied, in case the schedule was specified as a schedule tree.
*
* We first check if the user has specified a (non-empty) isolated
* schedule domain.
* We first check if the user has specified an isolated schedule domain
* and that we are not already outside of this isolated schedule domain.
* If so, we break up the schedule domain into iterations that
* precede the isolated domain, the isolated domain itself,
* the iterations that follow the isolated domain and
@ -3315,7 +3314,7 @@ static __isl_give isl_ast_graft_list *generate_shifted_component_tree(
isl_union_set *schedule_domain;
isl_set *domain;
isl_basic_set *hull;
isl_set *isolated, *before, *after;
isl_set *isolated, *before, *after, *test;
isl_map *gt, *lt;
isl_ast_graft_list *list, *res;
@ -3331,7 +3330,9 @@ static __isl_give isl_ast_graft_list *generate_shifted_component_tree(
isolated = isl_ast_build_get_isolated(build);
isolated = isl_set_intersect(isolated, isl_set_copy(domain));
empty = isl_set_is_empty(isolated);
test = isl_ast_build_specialize(build, isl_set_copy(isolated));
empty = isl_set_is_empty(test);
isl_set_free(test);
if (empty < 0)
goto error;
if (empty) {
@ -5224,8 +5225,6 @@ static int before_each_mark(__isl_keep isl_id *mark,
}
/* Call the after_each_mark callback, if requested by the user.
*
* Return 0 on success and -1 on error.
*
* The caller is responsible for recording the current inverse schedule
* in "build".

View File

@ -1914,6 +1914,18 @@ error:
return NULL;
}
/* Return an empty basic map living in the same space as "map".
*/
static __isl_give isl_basic_map *replace_map_by_empty_basic_map(
__isl_take isl_map *map)
{
isl_space *space;
space = isl_map_get_space(map);
isl_map_free(map);
return isl_basic_map_empty(space);
}
/* Compute the convex hull of a map.
*
* The implementation was inspired by "Extended Convex Hull" by Fukuda et al.,
@ -1932,11 +1944,8 @@ struct isl_basic_map *isl_map_convex_hull(struct isl_map *map)
if (!map)
goto error;
if (map->n == 0) {
convex_hull = isl_basic_map_empty_like_map(map);
isl_map_free(map);
return convex_hull;
}
if (map->n == 0)
return replace_map_by_empty_basic_map(map);
model = isl_basic_map_copy(map->p[0]);
set = isl_map_underlying_set(map);
@ -2330,11 +2339,8 @@ static __isl_give isl_basic_map *map_simple_hull(__isl_take isl_map *map,
if (!map)
return NULL;
if (map->n == 0) {
hull = isl_basic_map_empty_like_map(map);
isl_map_free(map);
return hull;
}
if (map->n == 0)
return replace_map_by_empty_basic_map(map);
if (map->n == 1) {
hull = isl_basic_map_copy(map->p[0]);
isl_map_free(map);

View File

@ -935,7 +935,7 @@ static __isl_give isl_flow *compute_val_based_dependences(
depth = 2 * isl_map_dim(acc->sink.map, isl_dim_in) + 1;
mustdo = isl_map_domain(isl_map_copy(acc->sink.map));
maydo = isl_set_empty_like(mustdo);
maydo = isl_set_empty(isl_set_get_space(mustdo));
if (!mustdo || !maydo)
goto error;
if (isl_set_plain_is_empty(mustdo))
@ -948,7 +948,9 @@ static __isl_give isl_flow *compute_val_based_dependences(
for (level = depth; level >= 1; --level) {
for (j = acc->n_must-1; j >=0; --j) {
must_rel[j] = isl_map_empty_like(res->dep[2 * j].map);
isl_space *space;
space = isl_map_get_space(res->dep[2 * j].map);
must_rel[j] = isl_map_empty(space);
may_rel[j] = isl_map_copy(must_rel[j]);
}

View File

@ -406,6 +406,14 @@ static int isl_qpolynomial_sign(__isl_keep isl_set *set,
return sgn;
}
/* Combine "fold1" and "fold2" into a single reduction, eliminating
* those elements of one reduction that are already covered by the other
* reduction on "set".
*
* If "fold1" or "fold2" is an empty reduction, then return
* the other reduction.
* If "fold1" or "fold2" is a NaN, then return this NaN.
*/
__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold_on_domain(
__isl_keep isl_set *set,
__isl_take isl_qpolynomial_fold *fold1,
@ -425,12 +433,14 @@ __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold_on_domain(
better = fold1->type == isl_fold_max ? -1 : 1;
if (isl_qpolynomial_fold_is_empty(fold1)) {
if (isl_qpolynomial_fold_is_empty(fold1) ||
isl_qpolynomial_fold_is_nan(fold2)) {
isl_qpolynomial_fold_free(fold1);
return fold2;
}
if (isl_qpolynomial_fold_is_empty(fold2)) {
if (isl_qpolynomial_fold_is_empty(fold2) ||
isl_qpolynomial_fold_is_nan(fold1)) {
isl_qpolynomial_fold_free(fold2);
return fold1;
}
@ -775,6 +785,17 @@ int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold)
return fold->n == 0;
}
/* Does "fold" represent max(NaN) or min(NaN)?
*/
int isl_qpolynomial_fold_is_nan(__isl_keep isl_qpolynomial_fold *fold)
{
if (!fold)
return -1;
if (fold->n != 1)
return 0;
return isl_qpolynomial_is_nan(fold->qp[0]);
}
__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold(
__isl_take isl_qpolynomial_fold *fold1,
__isl_take isl_qpolynomial_fold *fold2)

View File

@ -41,9 +41,9 @@ static struct isl_basic_set *unit_box_base_points(struct isl_basic_set *bset)
goto error;
if (bset->n_eq != 0) {
unit_box = isl_basic_set_empty_like(bset);
isl_space *space = isl_basic_set_get_space(bset);
isl_basic_set_free(bset);
return unit_box;
return isl_basic_set_empty(space);
}
total = isl_basic_set_total_dim(bset);

View File

@ -2701,7 +2701,7 @@ static __isl_give isl_basic_map *basic_map_read(__isl_keep isl_stream *s)
"more than one disjunct", goto error);
if (map->n == 0)
bmap = isl_basic_map_empty_like_map(map);
bmap = isl_basic_map_empty(isl_map_get_space(map));
else
bmap = isl_basic_map_copy(map->p[0]);

View File

@ -5260,36 +5260,6 @@ __isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_space *dim)
return bset;
}
struct isl_basic_map *isl_basic_map_empty_like(struct isl_basic_map *model)
{
struct isl_basic_map *bmap;
if (!model)
return NULL;
bmap = isl_basic_map_alloc_space(isl_space_copy(model->dim), 0, 1, 0);
bmap = isl_basic_map_set_to_empty(bmap);
return bmap;
}
struct isl_basic_map *isl_basic_map_empty_like_map(struct isl_map *model)
{
struct isl_basic_map *bmap;
if (!model)
return NULL;
bmap = isl_basic_map_alloc_space(isl_space_copy(model->dim), 0, 1, 0);
bmap = isl_basic_map_set_to_empty(bmap);
return bmap;
}
struct isl_basic_set *isl_basic_set_empty_like(struct isl_basic_set *model)
{
struct isl_basic_set *bset;
if (!model)
return NULL;
bset = isl_basic_set_alloc_space(isl_space_copy(model->dim), 0, 1, 0);
bset = isl_basic_set_set_to_empty(bset);
return bset;
}
__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_space *dim)
{
struct isl_basic_map *bmap;
@ -5341,60 +5311,16 @@ __isl_give isl_set *isl_set_nat_universe(__isl_take isl_space *dim)
return isl_map_nat_universe(dim);
}
__isl_give isl_basic_map *isl_basic_map_universe_like(
__isl_keep isl_basic_map *model)
{
if (!model)
return NULL;
return isl_basic_map_alloc_space(isl_space_copy(model->dim), 0, 0, 0);
}
struct isl_basic_set *isl_basic_set_universe_like(struct isl_basic_set *model)
{
if (!model)
return NULL;
return isl_basic_set_alloc_space(isl_space_copy(model->dim), 0, 0, 0);
}
__isl_give isl_basic_set *isl_basic_set_universe_like_set(
__isl_keep isl_set *model)
{
if (!model)
return NULL;
return isl_basic_set_alloc_space(isl_space_copy(model->dim), 0, 0, 0);
}
__isl_give isl_map *isl_map_empty(__isl_take isl_space *dim)
{
return isl_map_alloc_space(dim, 0, ISL_MAP_DISJOINT);
}
struct isl_map *isl_map_empty_like(struct isl_map *model)
{
if (!model)
return NULL;
return isl_map_alloc_space(isl_space_copy(model->dim), 0, ISL_MAP_DISJOINT);
}
struct isl_map *isl_map_empty_like_basic_map(struct isl_basic_map *model)
{
if (!model)
return NULL;
return isl_map_alloc_space(isl_space_copy(model->dim), 0, ISL_MAP_DISJOINT);
}
__isl_give isl_set *isl_set_empty(__isl_take isl_space *dim)
{
return isl_set_alloc_space(dim, 0, ISL_MAP_DISJOINT);
}
struct isl_set *isl_set_empty_like(struct isl_set *model)
{
if (!model)
return NULL;
return isl_set_empty(isl_space_copy(model->dim));
}
__isl_give isl_map *isl_map_universe(__isl_take isl_space *dim)
{
struct isl_map *map;
@ -5415,13 +5341,6 @@ __isl_give isl_set *isl_set_universe(__isl_take isl_space *dim)
return set;
}
__isl_give isl_set *isl_set_universe_like(__isl_keep isl_set *model)
{
if (!model)
return NULL;
return isl_set_universe(isl_space_copy(model->dim));
}
struct isl_map *isl_map_dup(struct isl_map *map)
{
int i;
@ -7681,32 +7600,11 @@ error:
return NULL;
}
struct isl_basic_map *isl_basic_map_identity_like(struct isl_basic_map *model)
{
if (!model || !model->dim)
return NULL;
return isl_basic_map_identity(isl_space_copy(model->dim));
}
__isl_give isl_map *isl_map_identity(__isl_take isl_space *dim)
{
return isl_map_from_basic_map(isl_basic_map_identity(dim));
}
struct isl_map *isl_map_identity_like(struct isl_map *model)
{
if (!model || !model->dim)
return NULL;
return isl_map_identity(isl_space_copy(model->dim));
}
struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model)
{
if (!model || !model->dim)
return NULL;
return isl_map_identity(isl_space_copy(model->dim));
}
__isl_give isl_map *isl_set_identity(__isl_take isl_set *set)
{
isl_space *dim = isl_set_get_space(set);

View File

@ -483,7 +483,7 @@ static __isl_give isl_map *basic_map_subtract(__isl_take isl_basic_map *bmap,
{
struct isl_subtract_diff_collector sdc;
sdc.dc.add = &basic_map_subtract_add;
sdc.diff = isl_map_empty_like_basic_map(bmap);
sdc.diff = isl_map_empty(isl_basic_map_get_space(bmap));
if (basic_map_collect_diff(bmap, map, &sdc.dc) < 0) {
isl_map_free(sdc.diff);
sdc.diff = NULL;
@ -546,7 +546,7 @@ static __isl_give isl_map *map_subtract( __isl_take isl_map *map1,
map1 = isl_map_remove_empty_parts(map1);
map2 = isl_map_remove_empty_parts(map2);
diff = isl_map_empty_like(map1);
diff = isl_map_empty(isl_map_get_space(map1));
for (i = 0; i < map1->n; ++i) {
struct isl_map *d;
d = basic_map_subtract(isl_basic_map_copy(map1->p[i]),
@ -775,7 +775,7 @@ error:
return NULL;
}
/* Return 1 is the singleton map "map1" is a subset of "map2",
/* Return 1 if the singleton map "map1" is a subset of "map2",
* i.e., if the single element of "map1" is also an element of "map2".
* Assumes "map2" has known divs.
*/
@ -789,7 +789,8 @@ static int map_is_singleton_subset(__isl_keep isl_map *map1,
if (!map1 || !map2)
return -1;
if (map1->n != 1)
return -1;
isl_die(isl_map_get_ctx(map1), isl_error_internal,
"expecting single-disjunct input", return -1);
point = singleton_extract_point(map1->p[0]);
if (!point)

View File

@ -1035,6 +1035,11 @@ struct isl_mat *isl_mat_swap_rows(struct isl_mat *mat, unsigned i, unsigned j)
return mat;
}
/* Calculate the product of two matrices.
*
* This function is optimized for operand matrices that contain many zeros and
* skips multiplications where we know one of the operands is zero.
*/
__isl_give isl_mat *isl_mat_product(__isl_take isl_mat *left,
__isl_take isl_mat *right)
{
@ -1055,10 +1060,13 @@ __isl_give isl_mat *isl_mat_product(__isl_take isl_mat *left,
return prod;
}
for (i = 0; i < prod->n_row; ++i) {
for (j = 0; j < prod->n_col; ++j) {
for (j = 0; j < prod->n_col; ++j)
isl_int_mul(prod->row[i][j],
left->row[i][0], right->row[0][j]);
for (k = 1; k < left->n_col; ++k)
for (k = 1; k < left->n_col; ++k) {
if (isl_int_is_zero(left->row[i][k]))
continue;
for (j = 0; j < prod->n_col; ++j)
isl_int_addmul(prod->row[i][j],
left->row[i][k], right->row[k][j]);
}

View File

@ -1892,6 +1892,10 @@ error:
return NULL;
}
/* Is "qp1" obviously equal to "qp2"?
*
* NaN is not equal to anything, not even to another NaN.
*/
int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1,
__isl_keep isl_qpolynomial *qp2)
{
@ -1900,6 +1904,9 @@ int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1,
if (!qp1 || !qp2)
return -1;
if (isl_qpolynomial_is_nan(qp1) || isl_qpolynomial_is_nan(qp2))
return 0;
equal = isl_space_is_equal(qp1->dim, qp2->dim);
if (equal < 0 || !equal)
return equal;

View File

@ -1211,11 +1211,8 @@ __isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap)
if (!sample_vec)
goto error;
if (sample_vec->size == 0) {
struct isl_basic_map *sample;
sample = isl_basic_map_empty_like(bmap);
isl_vec_free(sample_vec);
isl_basic_map_free(bmap);
return sample;
return isl_basic_map_set_to_empty(bmap);
}
bset = isl_basic_set_from_vec(sample_vec);
return isl_basic_map_overlying_set(bset, bmap);
@ -1246,7 +1243,7 @@ __isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map)
isl_basic_map_free(sample);
}
if (i == map->n)
sample = isl_basic_map_empty_like_map(map);
sample = isl_basic_map_empty(isl_map_get_space(map));
isl_map_free(map);
return sample;
error:

View File

@ -3577,7 +3577,7 @@ int isl_union_map_involves_dims(__isl_keep isl_union_map *umap,
if (type != isl_dim_param)
isl_die(isl_union_map_get_ctx(umap), isl_error_invalid,
"can only reference parameters", return 0);
"can only reference parameters", return -1);
excludes = union_map_forall_user(umap, &map_excludes, &data);