/* Interchange heuristics and transform for loop interchange on
polyhedral representation.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2014 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@amd.com> and
Harsha Jagasia <harsha.jagasia@amd.com>.
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/aff.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/ilp.h>
-#include <cloog/cloog.h>
-#include <cloog/isl/domain.h>
+#include <isl/val.h>
+#if defined(__cplusplus)
+extern "C" {
+#endif
+#include <isl/val_gmp.h>
+#if defined(__cplusplus)
+}
+#endif
#endif
#include "system.h"
#include "coretypes.h"
#include "tree.h"
-#include "tree-ssa.h"
+#include "predict.h"
+#include "vec.h"
+#include "hashtab.h"
+#include "hash-set.h"
+#include "machmode.h"
+#include "tm.h"
+#include "hard-reg-set.h"
+#include "input.h"
+#include "function.h"
+#include "dominance.h"
+#include "cfg.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-expr.h"
+#include "is-a.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
+#include "tree-ssa-loop.h"
#include "dumpfile.h"
#include "cfgloop.h"
#include "tree-chrec.h"
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
/* XXX isl rewrite following comment */
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. */
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;
}
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;
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);