diff --git a/gcc/graphite.c b/gcc/graphite.c
index 8f6d8a1..b2cf7c6 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -260,10 +260,12 @@ graphite_transform_loops (void)
bool need_cfg_cleanup_p = false;
VEC (scop_p, heap) *scops = NULL;
htab_t bb_pbb_mapping;
+ isl_ctx *ctx;
if (!graphite_initialize ())
return;
+ ctx = isl_ctx_alloc ();
build_scops (&scops);
if (dump_file&& (dump_flags& TDF_DETAILS))
@@ -277,6 +279,7 @@ graphite_transform_loops (void)
FOR_EACH_VEC_ELT (scop_p, scops, i, scop)
if (dbg_cnt (graphite_scop))
{
+ scop->ctx = ctx;
build_poly_scop (scop);
if (POLY_SCOP_P (scop)
@@ -288,6 +291,7 @@ graphite_transform_loops (void)
htab_delete (bb_pbb_mapping);
free_scops (scops);
graphite_finalize (need_cfg_cleanup_p);
+ isl_ctx_free (ctx);
}
You should pass context to graphite_initialize() and use
CloogState *cloog_isl_state_malloc(struct isl_ctx *ctx);
to allocate the CloogState. It is defined in
cloog/isl/cloog.h
Tobi