===================================================================
@@ -219,6 +219,7 @@
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
@@ -310,6 +311,7 @@
HOST_GMPINC = @gmpinc@
# Where to find ISL
+HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
# Where to find CLOOG
===================================================================
@@ -222,6 +222,7 @@
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
@@ -313,6 +314,7 @@
HOST_GMPINC = @gmpinc@
# Where to find ISL
+HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
# Where to find CLOOG
===================================================================
@@ -1705,6 +1705,10 @@
#undef HAVE_cloog
#endif
+/* Define if isl is in use. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_isl
+#endif
/* Define if F_SETLKW supported by fcntl. */
#ifndef USED_FOR_TARGET
===================================================================
@@ -27888,9 +27888,14 @@
+if test "x${ISLLIBS}" != "x" ; then
+$as_echo "#define HAVE_isl 1" >>confdefs.h
+fi
+
+
if test "x${CLOOGLIBS}" != "x" ; then
$as_echo "#define HAVE_cloog 1" >>confdefs.h
===================================================================
@@ -5514,6 +5514,9 @@
AC_ARG_VAR(ISLLIBS,[How to link ISL])
AC_ARG_VAR(ISLINC,[How to find ISL include files])
+if test "x${ISLLIBS}" != "x" ; then
+ AC_DEFINE(HAVE_isl, 1, [Define if isl is in use.])
+fi
AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG])
AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
===================================================================
@@ -23,14 +23,16 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -49,7 +51,7 @@
#include "tree-data-ref.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
===================================================================
@@ -21,15 +21,17 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/flow.h>
#include <isl/constraint.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -49,7 +51,7 @@
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-htab.h"
===================================================================
@@ -23,15 +23,17 @@
#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>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -51,7 +53,7 @@
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
/* XXX isl rewrite following comment */
===================================================================
@@ -20,7 +20,7 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -55,7 +55,7 @@
#include "tree-into-ssa.h"
#include <map>
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-isl-ast-to-gimple.h"
===================================================================
@@ -20,7 +20,7 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -48,7 +48,7 @@
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
static isl_union_set *
===================================================================
@@ -21,16 +21,18 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#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>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -52,7 +54,7 @@
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#define OPENSCOP_MAX_STRING 256
===================================================================
@@ -21,13 +21,15 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -55,7 +57,7 @@
#include "sese.h"
#include "tree-ssa-propagate.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
===================================================================
@@ -20,16 +20,18 @@
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
#include <isl/aff.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -62,7 +64,7 @@
#include "sese.h"
#include "tree-ssa-propagate.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "expr.h"
#include "graphite-poly.h"
#include "graphite-sese-to-poly.h"
===================================================================
@@ -34,15 +34,17 @@
#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 @@
#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 @@
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 @@
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 @@
}
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 @@
|| ((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 @@
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