]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac: Eliminate ClooG installation dependency.
authorRoman Gareev <gareevroman@gmail.com>
Mon, 18 Aug 2014 15:42:11 +0000 (15:42 +0000)
committerRoman Gareev <romangareev@gcc.gnu.org>
Mon, 18 Aug 2014 15:42:11 +0000 (15:42 +0000)
* 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.

From-SVN: r214106

23 files changed:
ChangeLog
Makefile.in
Makefile.tpl
config/ChangeLog
config/cloog.m4
config/isl.m4
configure
configure.ac
gcc/ChangeLog
gcc/Makefile.in
gcc/config.in
gcc/configure
gcc/configure.ac
gcc/graphite-blocking.c
gcc/graphite-dependences.c
gcc/graphite-interchange.c
gcc/graphite-isl-ast-to-gimple.c
gcc/graphite-optimize-isl.c
gcc/graphite-poly.c
gcc/graphite-scop-detection.c
gcc/graphite-sese-to-poly.c
gcc/graphite.c
gcc/toplev.c

index 7475adcbc083e6bd6589a3445fad04504b0b9776..04e92bc1ccbfa2ae75944b4f1f9bbea80df65868 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-08-18 Roman Gareev  <gareevroman@gmail.com>
+
+       * configure.ac: Eliminate ClooG installation dependency.
+       * configure: Regenerate.
+       * Makefile.tpl: Add definition of ISLLIBS and HOST_ISLLIBS.
+       * Makefile.in: Regenerate.
+
 2014-08-15  Ilya Verbin  <iverbin@gmail.com>
 
        * MAINTAINERS (Write After Approval): Add myself.
index 329af7fb6f48eed3311c4eced3bf64a7b3d7eb74..add8cf6b379f2add77ba9aae2b7720ac98f8b952 100644 (file)
@@ -219,6 +219,7 @@ HOST_EXPORTS = \
        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_GMPLIBS = @gmplibs@
 HOST_GMPINC = @gmpinc@
 
 # Where to find ISL
+HOST_ISLLIBS = @isllibs@
 HOST_ISLINC = @islinc@
 
 # Where to find CLOOG
index 4822c3203bf147677bc28fdeca781f29f9918f78..00dba363a9ddfe8b5794318f87c4d51fe396f071 100644 (file)
@@ -222,6 +222,7 @@ HOST_EXPORTS = \
        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_GMPLIBS = @gmplibs@
 HOST_GMPINC = @gmpinc@
 
 # Where to find ISL
+HOST_ISLLIBS = @isllibs@
 HOST_ISLINC = @islinc@
 
 # Where to find CLOOG
index 34fe7a664ee0338c89e1828e16157e13760d5590..3a0d438cd510cc3ec627a7a15150add5d5a42479 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-18 Roman Gareev  <gareevroman@gmail.com>
+
+       * cloog.m4: Remove the path to isllibs from clooglibs.
+       * isl.m4: Add paths to islinc, isllibs.
+
 2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/47230
index d67465c3f2204ab3c2499d47d6b71ae8555718ce..b80ac2742aad704d243193c25541be9702fe38d6 100644 (file)
@@ -69,7 +69,7 @@ AC_DEFUN([CLOOG_INIT_FLAGS],
   fi
 
   clooginc="-DCLOOG_INT_GMP ${clooginc}"
-  clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
+  clooglibs="${clooglibs} -lcloog-isl"
 ]
 )
 
index f45854d222bf7773d12d7f27037d38a709a68efd..9743aee0e13037148ff1efb2def7649b2bbc0af9 100644 (file)
@@ -68,6 +68,9 @@ AC_DEFUN([ISL_INIT_FLAGS],
     ENABLE_ISL_CHECK=no
     AC_MSG_WARN([using in-tree ISL, disabling version check])
   fi
+
+  islinc="-DCLOOG_INT_GMP ${islinc}"
+  isllibs="${isllibs} -lisl"
 ]
 )
 
index c8b20b617aedefee15288c33806cdcfbe8483c03..6e24b556d85ed335b145e01a1711fd1f172d1057 100755 (executable)
--- a/configure
+++ b/configure
@@ -649,6 +649,7 @@ extra_linker_plugin_configure_flags
 clooginc
 clooglibs
 islinc
+isllibs
 poststage1_ldflags
 poststage1_libs
 stage1_ldflags
@@ -2760,7 +2761,7 @@ build_libs="build-libiberty"
 build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
 
 # these libraries are used by various programs built for the host environment
-#
+#f
 host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv"
 
 # these tools are built for the host environment
@@ -5835,10 +5836,9 @@ if test "${with_isl+set}" = set; then :
 fi
 
 
-# Treat either --without-cloog or --without-isl as a request to disable
+# Treat --without-isl as a request to disable
 # GRAPHITE support and skip all following checks.
-if test "x$with_isl" != "xno" &&
-   test "x$with_cloog" != "xno"; then
+if test "x$with_isl" != "xno"; then
   # Check for ISL
 
 
@@ -5890,6 +5890,9 @@ fi
 $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
   fi
 
+  islinc="-DCLOOG_INT_GMP ${islinc}"
+  isllibs="${isllibs} -lisl"
+
 
 
   if test "${ENABLE_ISL_CHECK}" = yes ; then
@@ -6021,7 +6024,7 @@ $as_echo "$as_me: WARNING: using in-tree CLooG, disabling version check" >&2;}
   fi
 
   clooginc="-DCLOOG_INT_GMP ${clooginc}"
-  clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
+  clooglibs="${clooglibs} -lcloog-isl"
 
 
 
@@ -6098,11 +6101,9 @@ $as_echo "$gcc_cv_cloog" >&6; }
   fi
 fi
 
-# If either the ISL or the CLooG check failed, disable builds of in-tree
-# variants of both
+# If the ISL check failed, disable builds of in-tree
+# variants of both ISL and CLooG
 if test "x$with_isl" = xno ||
-   test "x$with_cloog" = xno ||
-   test "x$gcc_cv_cloog" = xno ||
    test "x$gcc_cv_isl" = xno; then
   noconfigdirs="$noconfigdirs cloog isl"
   islinc=
@@ -6110,6 +6111,15 @@ if test "x$with_isl" = xno ||
   clooglibs=
 fi
 
+# If the CLooG check failed, disable builds of in-tree
+# variants of CLooG
+if test "x$with_cloog" = xno ||
+   test "x$gcc_cv_cloog" = xno; then
+  noconfigdirs="$noconfigdirs cloog isl"
+  clooginc=
+  clooglibs=
+fi
+
 
 
 
@@ -7325,7 +7335,7 @@ do
 
 
     case $lib in
-    mpc | mpfr | gmp | cloog)
+    mpc | mpfr | gmp | isl | cloog)
       # If we're processing --with-$lib, --with-$lib-include or
       # --with-$lib-lib, for one of the libs above, and target is
       # different from host, don't pass the current argument to any
index 163de5f7220b0753c682c4a15fa7b5cc1a85b6f2..8f747d62c7278729a96c86a4ed6423a2e2fd44a1 100644 (file)
@@ -132,7 +132,7 @@ build_libs="build-libiberty"
 build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
 
 # these libraries are used by various programs built for the host environment
-#
+#f
 host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv"
 
 # these tools are built for the host environment
@@ -1644,10 +1644,9 @@ AC_ARG_WITH(isl,
     Equivalent to --with-isl-include=PATH/include
     plus --with-isl-lib=PATH/lib])])
 
-# Treat either --without-cloog or --without-isl as a request to disable
+# Treat --without-isl as a request to disable
 # GRAPHITE support and skip all following checks.
-if test "x$with_isl" != "xno" &&
-   test "x$with_cloog" != "xno"; then
+if test "x$with_isl" != "xno"; then
   # Check for ISL
   dnl Provide configure switches and initialize islinc & isllibs
   dnl with user input.
@@ -1672,11 +1671,9 @@ if test "x$with_isl" != "xno" &&
   fi
 fi
 
-# If either the ISL or the CLooG check failed, disable builds of in-tree
-# variants of both
+# If the ISL check failed, disable builds of in-tree
+# variants of both ISL and CLooG
 if test "x$with_isl" = xno ||
-   test "x$with_cloog" = xno ||
-   test "x$gcc_cv_cloog" = xno ||
    test "x$gcc_cv_isl" = xno; then
   noconfigdirs="$noconfigdirs cloog isl"
   islinc=
@@ -1684,11 +1681,20 @@ if test "x$with_isl" = xno ||
   clooglibs=
 fi
 
+# If the CLooG check failed, disable builds of in-tree
+# variants of CLooG
+if test "x$with_cloog" = xno ||
+   test "x$gcc_cv_cloog" = xno; then
+  noconfigdirs="$noconfigdirs cloog isl"
+  clooginc=
+  clooglibs=
+fi
+
+AC_SUBST(isllibs)
 AC_SUBST(islinc)
 AC_SUBST(clooglibs)
 AC_SUBST(clooginc)
 
-
 # Check for LTO support.
 AC_ARG_ENABLE(lto,
 [AS_HELP_STRING([--enable-lto], [enable link time optimization support])],
@@ -2812,7 +2818,7 @@ changequote(,)
 changequote([,])
 
     case $lib in
-    mpc | mpfr | gmp | cloog)
+    mpc | mpfr | gmp | isl | cloog)
       # If we're processing --with-$lib, --with-$lib-include or
       # --with-$lib-lib, for one of the libs above, and target is
       # different from host, don't pass the current argument to any
index 75591f450d76d458eb082c1ef147d6ce79ca771a..7f7a3bfff15f4a695a88cfaebf5ebddd3303223d 100644 (file)
@@ -1,3 +1,21 @@
+2014-08-18 Roman Gareev  <gareevroman@gmail.com>
+
+       * 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.
+
 2014-08-18  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/62090
index 76ceca89f8b2c6a1d4011bc888e321428a2d9bba..1b3820b4b34b6f44471f9528d2381592a2880005 100644 (file)
@@ -335,6 +335,7 @@ GMPLIBS = @GMPLIBS@
 GMPINC = @GMPINC@
 
 # How to find ISL
+ISLLIBS = @ISLLIBS@
 ISLINC = @ISLINC@
 
 # How to find CLOOG
@@ -1011,7 +1012,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
 # and the system's installed libraries.
 LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
        $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(CLOOGLIBS) $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
        $(ZLIB)
 # Any system libraries needed just for GNAT.
 SYSLIBS = @GNAT_LIBEXC@
index a1bda76290d8b6662417482cc277b7f5d5b05a9f..90809e37466ce57f3660c7107da4fac50c23d5a2 100644 (file)
 #undef HAVE_WORKING_VFORK
 #endif
 
+/* Define if isl is in use. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_isl
+#endif
 
 /* Define if cloog is in use. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_cloog
 #endif
 
-
 /* Define if F_SETLKW supported by fcntl. */
 #ifndef USED_FOR_TARGET
 #undef HOST_HAS_F_SETLKW
index fe2e6470acc364c30b4c91ef6f1f958f6f09fb83..5e0dcfbfe169253151a4b88e74683dc94f6922e1 100755 (executable)
 
 
 
+if test "x${ISLLIBS}" != "x" ; then
+
+$as_echo "#define HAVE_isl 1" >>confdefs.h
+
+fi
 
 
 
index ea8eca4d76990d81d7fceb2f80e3ada4dfedd986..cdd5ed7baef1fa840cb4af91c3906e60ba3031bf 100644 (file)
@@ -5514,6 +5514,9 @@ AC_ARG_VAR(GMPINC,[How to find GMP include files])
 
 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])
index 20a24eb2cf344b7a9b9ff625f797c9c284f996fb..2e83fea4c7b7fffa4940411d3512b55993021bbc 100644 (file)
@@ -23,14 +23,16 @@ 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/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 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-data-ref.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 
 
index a02bc23b6eea77b3c888971a8c3298cbd2e22df3..cab63478dff5f75996b4b231bea710bfd2168a3f 100644 (file)
@@ -21,15 +21,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/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 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-scalar-evolution.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 #include "graphite-htab.h"
 
@@ -630,6 +632,8 @@ graphite_legal_transform (scop_p scop)
   return res;
 }
 
+#ifdef HAVE_cloog
+
 /* Return true when the loop at DEPTH carries dependences.  BODY is
    the body of the loop.  */
 
@@ -685,3 +689,4 @@ loop_is_parallel_p (loop_p loop, bb_pbb_htab_type *bb_pbb_mapping, int depth)
 }
 
 #endif
+#endif
index 45db539f420a4d7a3c57d9317352f296cdbdfe25..8d691dbc7d50dd7f781c415d129bad400cb9db88 100644 (file)
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "config.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include <isl/aff.h>
 #include <isl/set.h>
 #include <isl/map.h>
@@ -37,9 +37,11 @@ extern "C" {
 #if defined(__cplusplus)
 }
 #endif
+#ifdef HAVE_cloog
 #include <cloog/cloog.h>
 #include <cloog/isl/domain.h>
 #endif
+#endif
 
 #include "system.h"
 #include "coretypes.h"
@@ -59,7 +61,7 @@ extern "C" {
 #include "tree-scalar-evolution.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 
 /* XXX isl rewrite following comment */
index 44357dc823ff5cdfc4b69fb111d11e4addb67b0b..5cb0919a61e9ffd82b61a48a1b480245e9533169 100644 (file)
@@ -20,7 +20,7 @@ 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/union_map.h>
@@ -55,7 +55,7 @@ extern "C" {
 #include "tree-into-ssa.h"
 #include <map>
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 #include "graphite-isl-ast-to-gimple.h"
 
index 31f30185cecb1c19b5dd04d214f3f456ada6e8ea..ce372e6e4995dd9cd02d63c9cd3b5e5e8d23d0fe 100644 (file)
@@ -20,7 +20,7 @@ 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/union_map.h>
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-scalar-evolution.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 
 static isl_union_set *
index 28ab4df9f16d5791120121cb62aa4e299ef017e4..57f62cd2ba1c3e9819c6767888642692092a2c37 100644 (file)
@@ -21,7 +21,7 @@ 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/union_map.h>
@@ -36,9 +36,11 @@ extern "C" {
 #if defined(__cplusplus)
 }
 #endif
+#ifdef HAVE_cloog
 #include <cloog/cloog.h>
 #include <cloog/isl/domain.h>
 #endif
+#endif
 
 #include "system.h"
 #include "coretypes.h"
@@ -60,7 +62,7 @@ extern "C" {
 #include "tree-scalar-evolution.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 
 #define OPENSCOP_MAX_STRING 256
index 4158368917cb182bff1ca03af9913ffa513e4791..53823b8678735f914579691c889046b11df92f04 100644 (file)
@@ -21,13 +21,15 @@ 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/union_map.h>
+#ifdef HAVE_cloog
 #include <cloog/cloog.h>
 #include <cloog/isl/domain.h>
 #endif
+#endif
 
 #include "system.h"
 #include "coretypes.h"
@@ -56,7 +58,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-ssa-propagate.h"
 #include "cp/cp-tree.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 #include "graphite-scop-detection.h"
 
index c36420a2b78f5dddddcc2bc72efa498f66144a8a..c3adfe13e9e1af6ce51943930462f478ed9b1c5a 100644 (file)
@@ -20,7 +20,7 @@ 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/union_map.h>
@@ -38,10 +38,12 @@ extern "C" {
 #if defined(__cplusplus)
 }
 #endif
+#ifdef HAVE_cloog
 #include <cloog/cloog.h>
 #include <cloog/cloog.h>
 #include <cloog/isl/domain.h>
 #endif
+#endif
 
 #include "system.h"
 #include "coretypes.h"
@@ -74,7 +76,7 @@ extern "C" {
 #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"
index aa5b8d8aa490a1810c902daa090ffd69b5c88e9c..650432d255255550f8c27cc69f96d765544f538e 100644 (file)
@@ -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
index 88d48c2d68844bbe5b50ec497bb91cede2d3c2a0..aaad68816e48c1b35a8038dd7f0d2b66f3dd85a7 100644 (file)
@@ -1275,15 +1275,15 @@ process_options (void)
   else
     aux_base_name = "gccaux";
 
-#ifndef HAVE_cloog
+#ifndef HAVE_isl
   if (flag_graphite
       || flag_graphite_identity
       || flag_loop_block
       || flag_loop_interchange
       || flag_loop_strip_mine
       || flag_loop_parallelize_all)
-    sorry ("Graphite loop optimizations cannot be used (-fgraphite, "
-          "-fgraphite-identity, -floop-block, "
+    sorry ("Graphite loop optimizations cannot be used (ISL is not available)" 
+          "(-fgraphite, -fgraphite-identity, -floop-block, "
           "-floop-interchange, -floop-strip-mine, -floop-parallelize-all, "
           "and -ftree-loop-linear)");
 #endif