diff options
author | mircea <mircea@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-11 15:05:48 +0000 |
---|---|---|
committer | mircea <mircea@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-11 15:05:48 +0000 |
commit | ea48ac017975b0f0d4bd1ebd4b25fc658ba5f033 (patch) | |
tree | ec40baa6e93fa6be67bdf487f2098cdc926b38b4 /gcc/graphite-clast-to-gimple.c | |
parent | 2544aaabd9bb288a41ec9060d046b30763d36732 (diff) | |
download | gcc-ea48ac017975b0f0d4bd1ebd4b25fc658ba5f033.tar.gz |
Replacement of isl_int by isl_val
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-clast-to-gimple.c')
-rw-r--r-- | gcc/graphite-clast-to-gimple.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 296b893809f..0b0bf520160 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -28,6 +28,14 @@ along with GCC; see the file COPYING3. If not see #include <isl/constraint.h> #include <isl/ilp.h> #include <isl/aff.h> +#include <isl/val.h> +#if defined(__cplusplus) +extern "C" { +#endif +#include <isl/val_gmp.h> +#if defined(__cplusplus) +} +#endif #include <cloog/cloog.h> #include <cloog/isl/domain.h> #endif @@ -871,18 +879,18 @@ graphite_create_new_guard (edge entry_edge, struct clast_guard *stmt, static void compute_bounds_for_param (scop_p scop, int param, mpz_t low, mpz_t up) { - isl_int v; + isl_val *v; isl_aff *aff = isl_aff_zero_on_domain (isl_local_space_from_space (isl_set_get_space (scop->context))); aff = isl_aff_add_coefficient_si (aff, isl_dim_param, param, 1); - isl_int_init (v); - isl_set_min (scop->context, aff, &v); - isl_int_get_gmp (v, low); - isl_set_max (scop->context, aff, &v); - isl_int_get_gmp (v, up); - isl_int_clear (v); + v = isl_set_min_val (scop->context, aff); + isl_val_get_num_gmp (v, low); + isl_val_free (v); + v = isl_set_max_val (scop->context, aff); + isl_val_get_num_gmp (v, up); + isl_val_free (v); isl_aff_free (aff); } @@ -901,8 +909,7 @@ compute_bounds_for_loop (struct clast_for *loop, mpz_t low, mpz_t up) isl_set *domain; isl_aff *dimension; isl_local_space *local_space; - isl_int isl_value; - enum isl_lp_result lp_result; + isl_val *isl_value; domain = isl_set_copy (isl_set_from_cloog_domain (loop->domain)); local_space = isl_local_space_from_space (isl_set_get_space (domain)); @@ -911,17 +918,12 @@ compute_bounds_for_loop (struct clast_for *loop, mpz_t low, mpz_t up) isl_set_dim (domain, isl_dim_set) - 1, 1); - isl_int_init (isl_value); - - lp_result = isl_set_min (domain, dimension, &isl_value); - assert (lp_result == isl_lp_ok); - isl_int_get_gmp (isl_value, low); - - lp_result = isl_set_max (domain, dimension, &isl_value); - assert (lp_result == isl_lp_ok); - isl_int_get_gmp (isl_value, up); - - isl_int_clear (isl_value); + isl_value = isl_set_min_val (domain, dimension); + isl_val_get_num_gmp (isl_value, low); + isl_val_free (isl_value); + isl_value = isl_set_max_val (domain, dimension); + isl_val_get_num_gmp (isl_value, up); + isl_val_free (isl_value); isl_set_free (domain); isl_aff_free (dimension); } |