isl_basic_map_from_constraint_matrices: (simplify and) finalize result
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 22 Oct 2012 21:46:31 +0000 (23:46 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 16 Dec 2012 13:36:21 +0000 (14:36 +0100)
isl_basic_map_from_constraint_matrices belongs to the public API so it
should return a finalized basic relation.  The user probably expects
the result to be simplified as well.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index b0554cf..922bbf9 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -10272,7 +10272,8 @@ __isl_give isl_basic_map *isl_basic_map_from_constraint_matrices(
        isl_mat_free(eq);
        isl_mat_free(ineq);
 
-       return bmap;
+       bmap = isl_basic_map_simplify(bmap);
+       return isl_basic_map_finalize(bmap);
 error:
        isl_space_free(dim);
        isl_mat_free(eq);