summaryrefslogtreecommitdiff
path: root/gcc/graphite.c
diff options
context:
space:
mode:
authorromangareev <romangareev@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-18 15:42:11 +0000
committerromangareev <romangareev@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-18 15:42:11 +0000
commit429cca5154707b85df6b5b7a678441fdf8fd9b8a (patch)
treea353a3d31ffda81ef6d90612de9127c49b5fe3d1 /gcc/graphite.c
parent95e631b86f0f367b7cbb4ef744b238576885e587 (diff)
downloadgcc-429cca5154707b85df6b5b7a678441fdf8fd9b8a.tar.gz
* configure.ac: Eliminate ClooG installation dependency.
* configure: Regenerate. * Makefile.tpl: Add definition of ISLLIBS and HOST_ISLLIBS. * Makefile.in: Regenerate. [config/] * cloog.m4: Remove the path to isllibs from clooglibs. * isl.m4: Add paths to islinc, isllibs. [gcc/] * Makefile.in: Add definition of ISLLIBS, HOST_ISLLIBS. * config.in: Add undef of HAVE_isl. * configure: Regenerate. * configure.ac: Add definition of HAVE_isl. * graphite-blocking.c: Add checking of HAVE_isl. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * toplev.c: Replace the checking of HAVE_cloog with the checking of HAVE_isl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214106 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r--gcc/graphite.c37
1 files changed, 32 insertions, 5 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c
index aa5b8d8aa49..650432d2552 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -34,15 +34,17 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/options.h>
#include <isl/union_map.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#include <cloog/isl/cloog.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -68,16 +70,19 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "tree-cfgcleanup.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
-#include "graphite-clast-to-gimple.h"
#include "graphite-isl-ast-to-gimple.h"
#include "graphite-sese-to-poly.h"
#include "graphite-htab.h"
+#ifdef HAVE_cloog
+#include "graphite-clast-to-gimple.h"
+
CloogState *cloog_state;
+#endif
/* Print global statistics to FILE. */
@@ -228,7 +233,9 @@ graphite_initialize (isl_ctx *ctx)
recompute_all_dominators ();
initialize_original_copy_tables ();
+#ifdef HAVE_cloog
cloog_state = cloog_isl_state_malloc (ctx);
+#endif
if (dump_file && dump_flags)
dump_function_to_file (current_function_decl, dump_file, dump_flags);
@@ -251,7 +258,9 @@ graphite_finalize (bool need_cfg_cleanup_p)
tree_estimate_probability ();
}
+#ifdef HAVE_cloog
cloog_state_free (cloog_state);
+#endif
free_original_copy_tables ();
if (dump_file && dump_flags)
@@ -292,12 +301,23 @@ graphite_transform_loops (void)
}
bb_pbb_htab_type bb_pbb_mapping (10);
+
+#ifndef HAVE_cloog
+ if(flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
+ {
+ flag_graphite_code_gen = FGRAPHITE_CODE_GEN_ISL;
+ printf ("The CLooG code generator cannot be used (CLooG is not "
+ "available). The ISL code generator was chosen.\n");
+ }
+#endif
+
FOR_EACH_VEC_ELT (scops, i, scop)
if (dbg_cnt (graphite_scop))
{
scop->ctx = ctx;
build_poly_scop (scop);
+#ifdef HAVE_cloog
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
&& (((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_ISL)
@@ -305,6 +325,13 @@ graphite_transform_loops (void)
|| ((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
&& graphite_regenerate_ast_cloog (scop, &bb_pbb_mapping))))
need_cfg_cleanup_p = true;
+#else
+ if (POLY_SCOP_P (scop)
+ && apply_poly_transforms (scop)
+ && graphite_regenerate_ast_isl (scop))
+ need_cfg_cleanup_p = true;
+#endif
+
}
free_scops (scops);
@@ -313,12 +340,12 @@ graphite_transform_loops (void)
isl_ctx_free (ctx);
}
-#else /* If Cloog is not available: #ifndef HAVE_cloog. */
+#else /* If ISL is not available: #ifndef HAVE_isl. */
static void
graphite_transform_loops (void)
{
- sorry ("Graphite loop optimizations cannot be used");
+ sorry ("Graphite loop optimizations cannot be used (ISL is not available).");
}
#endif