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-interchange.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-interchange.c')
-rw-r--r-- | gcc/graphite-interchange.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c index 55e3fab897d..45db539f420 100644 --- a/gcc/graphite-interchange.c +++ b/gcc/graphite-interchange.c @@ -29,6 +29,14 @@ along with GCC; see the file COPYING3. If not see #include <isl/map.h> #include <isl/union_map.h> #include <isl/ilp.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 @@ -79,13 +87,13 @@ build_linearized_memory_access (isl_map *map, poly_dr_p pdr) isl_local_space *ls = isl_local_space_from_space (isl_map_get_space (map)); unsigned offset, nsubs; int i; - isl_int size, subsize; + isl_ctx *ctx; + + isl_val *size, *subsize, *size1; res = isl_equality_alloc (ls); - isl_int_init (size); - isl_int_set_ui (size, 1); - isl_int_init (subsize); - isl_int_set_ui (subsize, 1); + ctx = isl_local_space_get_ctx (ls); + size = isl_val_int_from_ui (ctx, 1); nsubs = isl_set_dim (pdr->extent, isl_dim_set); /* -1 for the already included L dimension. */ @@ -98,18 +106,17 @@ build_linearized_memory_access (isl_map *map, poly_dr_p pdr) isl_space *dc; isl_aff *aff; - res = isl_constraint_set_coefficient (res, isl_dim_out, offset + i, size); - + size1 = isl_val_copy (size); + res = isl_constraint_set_coefficient_val (res, isl_dim_out, offset + i, size); dc = isl_set_get_space (pdr->extent); aff = isl_aff_zero_on_domain (isl_local_space_from_space (dc)); aff = isl_aff_set_coefficient_si (aff, isl_dim_in, i, 1); - isl_set_max (pdr->extent, aff, &subsize); + subsize = isl_set_max_val (pdr->extent, aff); isl_aff_free (aff); - isl_int_mul (size, size, subsize); + size = isl_val_mul (size1, subsize); } - isl_int_clear (subsize); - isl_int_clear (size); + isl_val_free (size); return res; } @@ -126,7 +133,7 @@ pdr_stride_in_loop (mpz_t stride, graphite_dim_t depth, poly_dr_p pdr) isl_aff *aff; isl_space *dc; isl_constraint *lma, *c; - isl_int islstride; + isl_val *islstride; graphite_dim_t time_depth; unsigned offset, nt; unsigned i; @@ -239,10 +246,9 @@ pdr_stride_in_loop (mpz_t stride, graphite_dim_t depth, poly_dr_p pdr) aff = isl_aff_zero_on_domain (isl_local_space_from_space (dc)); aff = isl_aff_set_coefficient_si (aff, isl_dim_in, offset - 1, -1); aff = isl_aff_set_coefficient_si (aff, isl_dim_in, offset + offset - 1, 1); - isl_int_init (islstride); - isl_set_max (set, aff, &islstride); - isl_int_get_gmp (islstride, stride); - isl_int_clear (islstride); + islstride = isl_set_max_val (set, aff); + isl_val_get_num_gmp (islstride, stride); + isl_val_free (islstride); isl_aff_free (aff); isl_set_free (set); |