aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-07-02 11:43:46 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-07-02 11:43:46 +0000
commit33ad93b9f4cb21a19b8cf60c77344bc1c9bdff6d (patch)
tree7571e73ba6cb3202642afdc4b34430a313e9a3a3 /gcc/graphite.c
parent6886e4444f193c399b96cb1f64a24b9673cf3149 (diff)
downloadgcc-33ad93b9f4cb21a19b8cf60c77344bc1c9bdff6d.zip
gcc-33ad93b9f4cb21a19b8cf60c77344bc1c9bdff6d.tar.gz
gcc-33ad93b9f4cb21a19b8cf60c77344bc1c9bdff6d.tar.bz2
cloog.m4: Set up to work against ISL only.
2012-07-02 Richard Guenther <rguenther@suse.de> Michael Matz <matz@suse.de> Tobias Grosser <tobias@grosser.es> Sebastian Pop <sebpop@gmail.com> config/ * cloog.m4: Set up to work against ISL only. * isl.m4: New file. * Makefile.def: Add ISL host module, remove PPL host module. Adjust ClooG host module to use the proper ISL. * Makefile.tpl: Pass ISL include flags instead of PPL ones. * configure.ac: Include config/isl.m4. Add ISL host library, remove PPL. Remove PPL configury, add ISL configury, adjust ClooG configury. * Makefile.in: Regenerated. * configure: Likewise. gcc/ * Makefile.in: Remove PPL flags in favor of ISL ones. (BACKENDLIBS): Remove PPL libs. (INCLUDES): Remove PPL includes in favor of ISL ones. (graphite-clast-to-gimple.o): Remove graphite-dependences.h and graphite-cloog-compat.h dependencies. (graphite-dependences.o): Likewise. (graphite-poly.o): Likewise. * configure.ac: Declare ISL vars instead of PPL ones. * configure: Regenerated. * doc/install.texi: Replace PPL requirement documentation with ISL one. * graphite-blocking.c: Remove PPL code, add ISL equivalent. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.h: Likewise. * graphite-poly.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * graphite-scop-detection.c: Re-arrange includes. * graphite-cloog-util.c: Remove. * graphite-cloog-util.h: Likewise. * graphite-ppl.h: Likewise. * graphite-ppl.c: Likewise. * graphite-dependences.h: Likewise. libgomp/ * testsuite/libgomp.graphite/force-parallel-4.c: Adjust. * testsuite/libgomp.graphite/force-parallel-5.c: Likewise. * testsuite/libgomp.graphite/force-parallel-7.c: Likewise. * testsuite/libgomp.graphite/force-parallel-8.c: Likewise. Co-Authored-By: Michael Matz <matz@suse.de> Co-Authored-By: Sebastian Pop <sebpop@gmail.com> Co-Authored-By: Tobias Grosser <tobias@grosser.es> From-SVN: r189156
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r--gcc/graphite.c38
1 files changed, 26 insertions, 12 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c
index a235876..04e1da2 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -1,5 +1,6 @@
/* Gimple Represented as Polyhedra.
- Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@inria.fr>.
This file is part of GCC.
@@ -33,6 +34,17 @@ along with GCC; see the file COPYING3. If not see
the functions that are used for transforming the code. */
#include "config.h"
+
+#ifdef HAVE_cloog
+#include <isl/set.h>
+#include <isl/map.h>
+#include <isl/options.h>
+#include <isl/union_map.h>
+#include <cloog/cloog.h>
+#include <cloog/isl/domain.h>
+#include <cloog/isl/cloog.h>
+#endif
+
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
@@ -47,8 +59,6 @@ along with GCC; see the file COPYING3. If not see
#ifdef HAVE_cloog
-#include "ppl_c.h"
-#include "graphite-ppl.h"
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
#include "graphite-clast-to-gimple.h"
@@ -186,10 +196,8 @@ print_graphite_statistics (FILE* file, VEC (scop_p, heap) *scops)
/* Initialize graphite: when there are no loops returns false. */
static bool
-graphite_initialize (void)
+graphite_initialize (isl_ctx *ctx)
{
- int ppl_initialized;
-
if (number_of_loops () <= 1
/* FIXME: This limit on the number of basic blocks of a function
should be removed when the SCOP detection is faster. */
@@ -198,6 +206,7 @@ graphite_initialize (void)
if (dump_file && (dump_flags & TDF_DETAILS))
print_global_statistics (dump_file);
+ isl_ctx_free (ctx);
return false;
}
@@ -205,10 +214,7 @@ graphite_initialize (void)
recompute_all_dominators ();
initialize_original_copy_tables ();
- ppl_initialized = ppl_initialize ();
- gcc_assert (ppl_initialized == 0);
-
- cloog_state = cloog_state_malloc ();
+ cloog_state = cloog_isl_state_malloc (ctx);
if (dump_file && dump_flags)
dump_function_to_file (current_function_decl, dump_file, dump_flags);
@@ -232,13 +238,14 @@ graphite_finalize (bool need_cfg_cleanup_p)
}
cloog_state_free (cloog_state);
- ppl_finalize ();
free_original_copy_tables ();
if (dump_file && dump_flags)
print_loops (dump_file, 3);
}
+isl_ctx *the_isl_ctx;
+
/* Perform a set of linear transforms on the loops of the current
function. */
@@ -250,15 +257,19 @@ 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 a function is parallel it was most probably already run through graphite
once. No need to run again. */
if (parallelized_function_p (cfun->decl))
return;
- if (!graphite_initialize ())
+ ctx = isl_ctx_alloc ();
+ isl_options_set_on_error(ctx, ISL_ON_ERROR_ABORT);
+ if (!graphite_initialize (ctx))
return;
+ the_isl_ctx = ctx;
build_scops (&scops);
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -272,6 +283,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)
@@ -283,6 +295,8 @@ graphite_transform_loops (void)
htab_delete (bb_pbb_mapping);
free_scops (scops);
graphite_finalize (need_cfg_cleanup_p);
+ the_isl_ctx = NULL;
+ isl_ctx_free (ctx);
}
#else /* If Cloog is not available: #ifndef HAVE_cloog. */