From 808e944f0c463fd9f828328306e874ce6cd3158e Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 12 Sep 2013 12:22:32 +0200 Subject: [PATCH] isl_basic_set_preimage: use isl_basic_set_add_dims isl_basic_set_extend always returns an object living in a map space. This happens to work out because isl_basic_set_preimage only gets called on objects that will get there spaces replaced afterwards. However, the objects may also interact with other objects before this space replacement and this only works because isl_space_underlying also returns a map space. This behavior will be changed in the next commit, so isl_basic_set_preimage needs to be adjusted first. Call isl_basic_set_add_dims, which does not change sets into maps. Note that this does mean that in the current situation, isl_basic_set_add_dims may get called on objects living in a map space, but this should be fairly harmless and will be fixed in the next commit. Signed-off-by: Sven Verdoolaege --- isl_mat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_mat.c b/isl_mat.c index fac1584e..839ad3fe 100644 --- a/isl_mat.c +++ b/isl_mat.c @@ -1368,7 +1368,8 @@ __isl_give isl_basic_set *isl_basic_set_preimage( isl_assert(ctx, mat->n_col > 0, goto error); if (mat->n_col > mat->n_row) { - bset = isl_basic_set_extend(bset, 0, mat->n_col-1, 0, 0, 0); + bset = isl_basic_set_add_dims(bset, isl_dim_set, + mat->n_col - mat->n_row); if (!bset) goto error; } else if (mat->n_col < mat->n_row) { -- 2.11.4.GIT