isl_basic_map_gauss: normalize resulting constraints
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 27 Sep 2010 08:47:25 +0000 (10:47 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 6 Oct 2010 09:48:15 +0000 (11:48 +0200)
When isl_basic_map_gauss is called from isl_basic_map_simplify,
the constraints get normalized already.  However, sometimes the calling
functions wants to only perform isl_basic_map_gauss and then the constraints
should still be normalized.

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

index d862f9a..a82f239 100644 (file)
@@ -393,6 +393,7 @@ static void eliminate_var_using_equality(struct isl_basic_map *bmap,
                if (progress)
                        *progress = 1;
                isl_seq_elim(bmap->eq[k], eq, 1+pos, 1+total, NULL);
+               isl_seq_normalize(bmap->ctx, bmap->eq[k], 1 + total);
        }
 
        for (k = 0; k < bmap->n_ineq; ++k) {
@@ -401,6 +402,7 @@ static void eliminate_var_using_equality(struct isl_basic_map *bmap,
                if (progress)
                        *progress = 1;
                isl_seq_elim(bmap->ineq[k], eq, 1+pos, 1+total, NULL);
+               isl_seq_normalize(bmap->ctx, bmap->ineq[k], 1 + total);
                ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED);
        }