isl_map_simplify.c: remove unused normalize_constraints_in_compressed_space
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 23 May 2011 18:56:36 +0000 (20:56 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 25 May 2011 12:09:00 +0000 (14:09 +0200)
Its last use was removed in d5e1701 (isl_basic_map_gist: be more aggressive
in removing constraints, Fri Apr 23 12:00:58 2010 +0200).
Presumably, it was kept because it thought it might still be useful in the
future.  However, it seems we haven't found a use for it so far and we
may be reorganizing the internals a bit in the not too distant future,
so let's just remove it for now.

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

index 984d6ef..0e5a2f0 100644 (file)
@@ -1495,94 +1495,6 @@ error:
        return bset;
 }
 
-/* Tighten (decrease) the constant terms of the inequalities based
- * on the equalities, without removing any integer points.
- * For example, if there is an equality
- *
- *             i = 3 * j
- *
- * and an inequality
- *
- *             i >= 1
- *
- * then we want to replace the inequality by
- *
- *             i >= 3
- *
- * We do this by computing a variable compression and translating
- * the constraints to the compressed space.
- * If any constraint has coefficients (except the contant term)
- * with a common factor "f", then we can replace the constant term "c"
- * by
- *
- *             f * floor(c/f)
- *
- * That is, we add
- *
- *             f * floor(c/f) - c = -fract(c/f)
- *
- * and we can add the same value to the original constraint.
- *
- * In the example, the compressed space only contains "j",
- * and the inequality translates to
- *
- *             3 * j - 1 >= 0
- *
- * We add -fract(-1/3) = -2 to the original constraint to obtain
- *
- *             i - 3 >= 0
- */
-static struct isl_basic_set *normalize_constraints_in_compressed_space(
-       struct isl_basic_set *bset)
-{
-       int i;
-       unsigned total;
-       struct isl_mat *B, *C;
-       isl_int gcd;
-
-       if (!bset)
-               return NULL;
-
-       if (ISL_F_ISSET(bset, ISL_BASIC_SET_RATIONAL))
-               return bset;
-
-       if (!bset->n_ineq)
-               return bset;
-
-       bset = isl_basic_set_cow(bset);
-       if (!bset)
-               return NULL;
-
-       total = isl_basic_set_total_dim(bset);
-       B = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, 0, 1 + total);
-       C = isl_mat_variable_compression(B, NULL);
-       if (!C)
-               return bset;
-       if (C->n_col == 0) {
-               isl_mat_free(C);
-               return isl_basic_set_set_to_empty(bset);
-       }
-       B = isl_mat_sub_alloc6(bset->ctx, bset->ineq,
-                                               0, bset->n_ineq, 0, 1 + total);
-       C = isl_mat_product(B, C);
-       if (!C)
-               return bset;
-
-       isl_int_init(gcd);
-       for (i = 0; i < bset->n_ineq; ++i) {
-               isl_seq_gcd(C->row[i] + 1, C->n_col - 1, &gcd);
-               if (isl_int_is_one(gcd))
-                       continue;
-               isl_int_fdiv_r(C->row[i][0], C->row[i][0], gcd);
-               isl_int_sub(bset->ineq[i][0], bset->ineq[i][0], C->row[i][0]);
-       }
-       isl_int_clear(gcd);
-
-       isl_mat_free(C);
-
-       return bset;
-}
-
 /* Remove all information from bset that is redundant in the context
  * of context.  Both bset and context are assumed to be full-dimensional.
  *