summaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/graphite-poly.c')
-rw-r--r--gcc/graphite-poly.c82
1 files changed, 26 insertions, 56 deletions
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index f4bdd401877..39d2da09276 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -1,5 +1,5 @@
/* Graphite polyhedral representation.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@amd.com> and
Tobias Grosser <grosser@fim.uni-passau.de>.
@@ -31,37 +31,17 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
-#include "gimple-pretty-print.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "tree-ssa-loop.h"
#include "cfgloop.h"
#include "tree-data-ref.h"
-
-#include <isl/constraint.h>
-#include <isl/set.h>
-#include <isl/map.h>
-#include <isl/union_map.h>
-#include <isl/constraint.h>
-#include <isl/ilp.h>
-#include <isl/aff.h>
-#include <isl/val.h>
-
-/* Since ISL-0.13, the extern is in val_gmp.h. */
-#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus)
-extern "C" {
-#endif
-#include <isl/val_gmp.h>
-#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus)
-}
-#endif
-
+#include "pretty-print.h"
+#include "gimple-pretty-print.h"
+#include "tree-dump.h"
#include "graphite.h"
-#define OPENSCOP_MAX_STRING 256
-
-
/* Print to STDERR the GMP value VAL. */
DEBUG_FUNCTION void
@@ -147,6 +127,17 @@ new_poly_dr (poly_bb_p pbb, gimple *stmt, enum poly_dr_type type,
pdr->subscript_sizes = subscript_sizes;
PDR_TYPE (pdr) = type;
PBB_DRS (pbb).safe_push (pdr);
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "Converting dr: ");
+ print_pdr (dump_file, pdr);
+ fprintf (dump_file, "To polyhedral representation:\n");
+ fprintf (dump_file, " - access functions: ");
+ print_isl_map (dump_file, acc);
+ fprintf (dump_file, " - subscripts: ");
+ print_isl_set (dump_file, subscript_sizes);
+ }
}
/* Free polyhedral data reference PDR. */
@@ -290,26 +281,15 @@ scop_p
new_scop (edge entry, edge exit)
{
sese_info_p region = new_sese_info (entry, exit);
- scop_p scop = XNEW (struct scop);
-
- scop->param_context = NULL;
- scop->must_raw = NULL;
- scop->may_raw = NULL;
- scop->must_raw_no_source = NULL;
- scop->may_raw_no_source = NULL;
- scop->must_war = NULL;
- scop->may_war = NULL;
- scop->must_war_no_source = NULL;
- scop->may_war_no_source = NULL;
- scop->must_waw = NULL;
- scop->may_waw = NULL;
- scop->must_waw_no_source = NULL;
- scop->may_waw_no_source = NULL;
- scop_set_region (scop, region);
- scop->pbbs.create (3);
- scop->drs.create (3);
-
- return scop;
+ scop_p s = XNEW (struct scop);
+
+ s->schedule = NULL;
+ s->param_context = NULL;
+ scop_set_region (s, region);
+ s->pbbs.create (3);
+ s->drs.create (3);
+ s->dependence = NULL;
+ return s;
}
/* Deletes SCOP. */
@@ -330,18 +310,8 @@ free_scop (scop_p scop)
scop->drs.release ();
isl_set_free (scop->param_context);
- isl_union_map_free (scop->must_raw);
- isl_union_map_free (scop->may_raw);
- isl_union_map_free (scop->must_raw_no_source);
- isl_union_map_free (scop->may_raw_no_source);
- isl_union_map_free (scop->must_war);
- isl_union_map_free (scop->may_war);
- isl_union_map_free (scop->must_war_no_source);
- isl_union_map_free (scop->may_war_no_source);
- isl_union_map_free (scop->must_waw);
- isl_union_map_free (scop->may_waw);
- isl_union_map_free (scop->must_waw_no_source);
- isl_union_map_free (scop->may_waw_no_source);
+ isl_union_map_free (scop->dependence);
+ scop->dependence = NULL;
XDELETE (scop);
}