From fa1cd4b1b93c95a2ee1ed4f17d56955220546b1b Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 13 Sep 2009 19:13:13 +0200 Subject: [PATCH] isl_basic_map_add_constraint: handle constraints obtained from basic maps The bmap field of a constraint may contain a basic map that is bounded by more than one constraint. The constraint can therefore not be added by simply taking the intersection with this bmap. Instead, first create a basic map that exactly corresponds to the constraint and then take the intersection with that basic map. --- isl_constraint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/isl_constraint.c b/isl_constraint.c index c1d9584..3e752f9 100644 --- a/isl_constraint.c +++ b/isl_constraint.c @@ -184,8 +184,7 @@ struct isl_basic_map *isl_basic_map_add_constraint( isl_dim_equal(bmap->dim, constraint->bmap->dim), goto error); bmap = isl_basic_map_intersect(bmap, - isl_basic_map_copy(constraint->bmap)); - isl_constraint_free(constraint); + isl_basic_map_from_constraint(constraint)); return bmap; error: isl_basic_map_free(bmap); -- 2.7.4