diff mbox

[GSoC] Elimination of CLooG library installation dependency

Message ID CABGF_gd-ecEcgSmEfmRYUPKkNoxxWxscx3WTVH6EpA989zwBPw@mail.gmail.com
State New
Headers show

Commit Message

Roman Gareev Aug. 15, 2014, 11:13 a.m. UTC
> I've attached the patch, which should eliminate CLooG library
> installation dependency from GCC. The CLooG AST generator is still the
> main code generator, but the isl ast generator will be chosen in case
> of nonavailability of CLooG library.
>
> However, I've found out a problem. Almost all the functions of the ISL
> cannot be used without installed CLooG. (I get errors which contain
> “undefined reference to...”). Maybe I missed something. What do you
> think about this?

I’ve attached a patch, which contains mentioned changes and doesn’t
cause the error. I want to commit it in coming days. What do you think
about it?
Maybe we should make the ISL AST generator to be the main code
generator of Graphite (the patch1 implements this). What do you think
about it?

Comments

Richard Biener Aug. 15, 2014, 11:44 a.m. UTC | #1
On Fri, Aug 15, 2014 at 1:13 PM, Roman Gareev <gareevroman@gmail.com> wrote:
>> I've attached the patch, which should eliminate CLooG library
>> installation dependency from GCC. The CLooG AST generator is still the
>> main code generator, but the isl ast generator will be chosen in case
>> of nonavailability of CLooG library.
>>
>> However, I've found out a problem. Almost all the functions of the ISL
>> cannot be used without installed CLooG. (I get errors which contain
>> “undefined reference to...”). Maybe I missed something. What do you
>> think about this?
>
> I’ve attached a patch, which contains mentioned changes and doesn’t
> cause the error. I want to commit it in coming days. What do you think
> about it?
> Maybe we should make the ISL AST generator to be the main code
> generator of Graphite (the patch1 implements this). What do you think
> about it?

We definitely should do that (and rip out the cloog code after a while).

Richard.

>
> --
>                                     Cheers, Roman Gareev.
Roman Gareev Aug. 16, 2014, 5:28 a.m. UTC | #2
Richard, could you please review these patches?  We would be very glad
for your comments.

P.S: I’ve attached an improved ChangeLog_entry.


2014-08-15 17:44 GMT+06:00 Richard Biener <richard.guenther@gmail.com>:
> On Fri, Aug 15, 2014 at 1:13 PM, Roman Gareev <gareevroman@gmail.com> wrote:
>>> I've attached the patch, which should eliminate CLooG library
>>> installation dependency from GCC. The CLooG AST generator is still the
>>> main code generator, but the isl ast generator will be chosen in case
>>> of nonavailability of CLooG library.
>>>
>>> However, I've found out a problem. Almost all the functions of the ISL
>>> cannot be used without installed CLooG. (I get errors which contain
>>> “undefined reference to...”). Maybe I missed something. What do you
>>> think about this?
>>
>> I’ve attached a patch, which contains mentioned changes and doesn’t
>> cause the error. I want to commit it in coming days. What do you think
>> about it?
>> Maybe we should make the ISL AST generator to be the main code
>> generator of Graphite (the patch1 implements this). What do you think
>> about it?
>
> We definitely should do that (and rip out the cloog code after a while).
>
> Richard.
Tobias Grosser Aug. 16, 2014, 10:40 a.m. UTC | #3
On 16/08/2014 13:28, Roman Gareev wrote:
> Richard, could you please review these patches?  We would be very glad
> for your comments.
>
> P.S: I’ve attached an improved ChangeLog_entry.

The patch and changelog looks good to me, but we still need a 
non-graphite reviewer oking the changes.

Tobias
Richard Biener Aug. 18, 2014, 1 p.m. UTC | #4
On Fri, Aug 15, 2014 at 1:13 PM, Roman Gareev <gareevroman@gmail.com> wrote:
>> I've attached the patch, which should eliminate CLooG library
>> installation dependency from GCC. The CLooG AST generator is still the
>> main code generator, but the isl ast generator will be chosen in case
>> of nonavailability of CLooG library.
>>
>> However, I've found out a problem. Almost all the functions of the ISL
>> cannot be used without installed CLooG. (I get errors which contain
>> “undefined reference to...”). Maybe I missed something. What do you
>> think about this?
>
> I’ve attached a patch, which contains mentioned changes and doesn’t
> cause the error. I want to commit it in coming days. What do you think
> about it?

This patch is ok.  I assume you have tested compiling with/without cloog
and isl.

> Maybe we should make the ISL AST generator to be the main code
> generator of Graphite (the patch1 implements this). What do you think
> about it?

This patch is also ok if you and Tobias think it is ready for wider
testing.  I propose to remove the cloog path at latest when we enter
stage3.

Thanks,
Richard.

>
> --
>                                     Cheers, Roman Gareev.
Roman Gareev Aug. 18, 2014, 3:22 p.m. UTC | #5
> This patch is ok.  I assume you have tested compiling with/without cloog
> and isl.

Yes, I’ve tested compiling with/without cloog and isl. Thank you very
much for review!
Bin.Cheng Aug. 20, 2014, 3:28 a.m. UTC | #6
I suspect this causes arm/aarch64 native bootstrap failure with below messages.

aarch64-none-linux-gnu-g++ -c   -g -O2 -DIN_GCC    -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/.
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../include
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libcpp/include
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
 -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libbacktrace
 -DCLOOG_INT_GMP   -o graphite.o -MT graphite.o -MMD -MP -MF
./.deps/graphite.TPo
/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c
/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c:38:21:
fatal error: isl/set.h: No such file or directory
compilation terminated.
make[1]: *** [graphite.o] Error 1
make[1]: Leaving directory
`/arm/scratch/pdtltest/bld-temporary/builds/fsf-trunk/502/workdir/aarch64-none-linux-gnu/obj/build-gcc/gcc'
make: *** [all-gcc] Error 2

Thanks,
bin


On Mon, Aug 18, 2014 at 11:22 PM, Roman Gareev <gareevroman@gmail.com> wrote:
>> This patch is ok.  I assume you have tested compiling with/without cloog
>> and isl.
>
> Yes, I've tested compiling with/without cloog and isl. Thank you very
> much for review!
>
> --
>                                     Cheers, Roman Gareev.
Roman Gareev Aug. 20, 2014, 5:24 a.m. UTC | #7
Which configure options do you use? Have you tried to bootstrap
r214105 with same configure options?
Have you tried to manually export the path to isl to LD_RUN_PATH?
(You’ve probably tried. I just want to make sure.)


2014-08-20 9:28 GMT+06:00 Bin.Cheng <amker.cheng@gmail.com>:
> I suspect this causes arm/aarch64 native bootstrap failure with below messages.
>
> aarch64-none-linux-gnu-g++ -c   -g -O2 -DIN_GCC    -fno-exceptions
> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
> -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
> -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/.
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../include
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libcpp/include
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
>  -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber/dpd
> -I../libdecnumber
> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libbacktrace
>  -DCLOOG_INT_GMP   -o graphite.o -MT graphite.o -MMD -MP -MF
> ./.deps/graphite.TPo
> /projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c
> /projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c:38:21:
> fatal error: isl/set.h: No such file or directory
> compilation terminated.
> make[1]: *** [graphite.o] Error 1
> make[1]: Leaving directory
> `/arm/scratch/pdtltest/bld-temporary/builds/fsf-trunk/502/workdir/aarch64-none-linux-gnu/obj/build-gcc/gcc'
> make: *** [all-gcc] Error 2
>
> Thanks,
> bin
Bin.Cheng Aug. 20, 2014, 5:47 a.m. UTC | #8
On Wed, Aug 20, 2014 at 1:24 PM, Roman Gareev <gareevroman@gmail.com> wrote:
> Which configure options do you use? Have you tried to bootstrap
> r214105 with same configure options?
> Have you tried to manually export the path to isl to LD_RUN_PATH?
> (You've probably tried. I just want to make sure.)

I can't access the build bot right now, so haven't tried other options
yet.  The latest good I got build was against r213896.

Thanks,
bin
>
>
> 2014-08-20 9:28 GMT+06:00 Bin.Cheng <amker.cheng@gmail.com>:
>> I suspect this causes arm/aarch64 native bootstrap failure with below messages.
>>
>> aarch64-none-linux-gnu-g++ -c   -g -O2 -DIN_GCC    -fno-exceptions
>> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
>> -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
>> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
>> -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/.
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../include
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libcpp/include
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
>>  -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber/dpd
>> -I../libdecnumber
>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libbacktrace
>>  -DCLOOG_INT_GMP   -o graphite.o -MT graphite.o -MMD -MP -MF
>> ./.deps/graphite.TPo
>> /projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c
>> /projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c:38:21:
>> fatal error: isl/set.h: No such file or directory
>> compilation terminated.
>> make[1]: *** [graphite.o] Error 1
>> make[1]: Leaving directory
>> `/arm/scratch/pdtltest/bld-temporary/builds/fsf-trunk/502/workdir/aarch64-none-linux-gnu/obj/build-gcc/gcc'
>> make: *** [all-gcc] Error 2
>>
>> Thanks,
>> bin
>
> --
>                                     Cheers, Roman Gareev.
Bin.Cheng Aug. 21, 2014, 5:15 a.m. UTC | #9
I think it's a issue in isl library check for (Canadian)
cross_compiling.  Will send a patch soon.

Thanks,
bin

On Wed, Aug 20, 2014 at 1:47 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Wed, Aug 20, 2014 at 1:24 PM, Roman Gareev <gareevroman@gmail.com> wrote:
>> Which configure options do you use? Have you tried to bootstrap
>> r214105 with same configure options?
>> Have you tried to manually export the path to isl to LD_RUN_PATH?
>> (You've probably tried. I just want to make sure.)
>
> I can't access the build bot right now, so haven't tried other options
> yet.  The latest good I got build was against r213896.
>
> Thanks,
> bin
>>
>>
>> 2014-08-20 9:28 GMT+06:00 Bin.Cheng <amker.cheng@gmail.com>:
>>> I suspect this causes arm/aarch64 native bootstrap failure with below messages.
>>>
>>> aarch64-none-linux-gnu-g++ -c   -g -O2 -DIN_GCC    -fno-exceptions
>>> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
>>> -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
>>> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
>>> -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/.
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../include
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libcpp/include
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/workdir/aarch64-none-linux-gnu/sysroot//usr/include
>>>  -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libdecnumber/dpd
>>> -I../libdecnumber
>>> -I/projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/../libbacktrace
>>>  -DCLOOG_INT_GMP   -o graphite.o -MT graphite.o -MMD -MP -MF
>>> ./.deps/graphite.TPo
>>> /projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c
>>> /projects/pd/pdsw-infrastructure/production-builds/bld-root/channels/fsf-trunk/builds/502/src/gcc/gcc/graphite.c:38:21:
>>> fatal error: isl/set.h: No such file or directory
>>> compilation terminated.
>>> make[1]: *** [graphite.o] Error 1
>>> make[1]: Leaving directory
>>> `/arm/scratch/pdtltest/bld-temporary/builds/fsf-trunk/502/workdir/aarch64-none-linux-gnu/obj/build-gcc/gcc'
>>> make: *** [all-gcc] Error 2
>>>
>>> Thanks,
>>> bin
>>
>> --
>>                                     Cheers, Roman Gareev.
diff mbox

Patch

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 214008)
+++ Makefile.in	(working copy)
@@ -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
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 214008)
+++ Makefile.tpl	(working copy)
@@ -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
Index: config/cloog.m4
===================================================================
--- config/cloog.m4	(revision 214008)
+++ config/cloog.m4	(working copy)
@@ -69,7 +69,7 @@ 
   fi
 
   clooginc="-DCLOOG_INT_GMP ${clooginc}"
-  clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
+  clooglibs="${clooglibs} -lcloog-isl"
 ]
 )
 
Index: config/isl.m4
===================================================================
--- config/isl.m4	(revision 214008)
+++ config/isl.m4	(working copy)
@@ -68,6 +68,9 @@ 
     ENABLE_ISL_CHECK=no
     AC_MSG_WARN([using in-tree ISL, disabling version check])
   fi
+
+  islinc="-DCLOOG_INT_GMP ${islinc}"
+  isllibs="${isllibs} -lisl"
 ]
 )
 
Index: configure
===================================================================
--- configure	(revision 214008)
+++ configure	(working copy)
@@ -649,6 +649,7 @@ 
 clooginc
 clooglibs
 islinc
+isllibs
 poststage1_ldflags
 poststage1_libs
 stage1_ldflags
@@ -2760,7 +2761,7 @@ 
 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 @@ 
 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,8 +5890,11 @@ 
 $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
     _isl_saved_CFLAGS=$CFLAGS
     _isl_saved_LDFLAGS=$LDFLAGS
@@ -6021,7 +6024,7 @@ 
   fi
 
   clooginc="-DCLOOG_INT_GMP ${clooginc}"
-  clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
+  clooglibs="${clooglibs} -lcloog-isl"
 
 
 
@@ -6098,11 +6101,9 @@ 
   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,11 +6111,20 @@ 
   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
 
 
 
 
 
+
 # Check for LTO support.
 # Check whether --enable-lto was given.
 if test "${enable_lto+set}" = set; then :
@@ -7325,7 +7335,7 @@ 
 
 
     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: configure.ac
===================================================================
--- configure.ac	(revision 214008)
+++ configure.ac	(working copy)
@@ -132,7 +132,7 @@ 
 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 @@ 
     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 @@ 
   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 @@ 
   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([,])
 
     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: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 214008)
+++ gcc/Makefile.in	(working copy)
@@ -335,6 +335,7 @@ 
 GMPINC = @GMPINC@
 
 # How to find ISL
+ISLLIBS = @ISLLIBS@
 ISLINC = @ISLINC@
 
 # How to find CLOOG
@@ -1011,7 +1012,7 @@ 
 # 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: gcc/config.in
===================================================================
--- gcc/config.in	(revision 214008)
+++ gcc/config.in	(working copy)
@@ -1699,13 +1699,16 @@ 
 #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: gcc/configure
===================================================================
--- gcc/configure	(revision 214008)
+++ gcc/configure	(working copy)
@@ -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
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 214008)
+++ gcc/configure.ac	(working copy)
@@ -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])
Index: gcc/graphite-blocking.c
===================================================================
--- gcc/graphite-blocking.c	(revision 214008)
+++ gcc/graphite-blocking.c	(working copy)
@@ -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"
 
 
Index: gcc/graphite-dependences.c
===================================================================
--- gcc/graphite-dependences.c	(revision 214008)
+++ gcc/graphite-dependences.c	(working copy)
@@ -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"
 
@@ -630,6 +632,8 @@ 
   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 @@ 
 }
 
 #endif
+#endif
Index: gcc/graphite-interchange.c
===================================================================
--- gcc/graphite-interchange.c	(revision 214008)
+++ gcc/graphite-interchange.c	(working copy)
@@ -23,7 +23,7 @@ 
 
 #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 @@ 
 #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 @@ 
 #include "tree-scalar-evolution.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 
 /* XXX isl rewrite following comment */
Index: gcc/graphite-isl-ast-to-gimple.c
===================================================================
--- gcc/graphite-isl-ast-to-gimple.c	(revision 214008)
+++ gcc/graphite-isl-ast-to-gimple.c	(working copy)
@@ -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"
 
Index: gcc/graphite-optimize-isl.c
===================================================================
--- gcc/graphite-optimize-isl.c	(revision 214008)
+++ gcc/graphite-optimize-isl.c	(working copy)
@@ -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 *
Index: gcc/graphite-poly.c
===================================================================
--- gcc/graphite-poly.c	(revision 214008)
+++ gcc/graphite-poly.c	(working copy)
@@ -21,7 +21,7 @@ 
 
 #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 @@ 
 #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 @@ 
 #include "tree-scalar-evolution.h"
 #include "sese.h"
 
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
 #include "graphite-poly.h"
 
 #define OPENSCOP_MAX_STRING 256
Index: gcc/graphite-scop-detection.c
===================================================================
--- gcc/graphite-scop-detection.c	(revision 214008)
+++ gcc/graphite-scop-detection.c	(working copy)
@@ -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"
@@ -56,7 +58,7 @@ 
 #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: gcc/graphite-sese-to-poly.c
===================================================================
--- gcc/graphite-sese-to-poly.c	(revision 214008)
+++ gcc/graphite-sese-to-poly.c	(working copy)
@@ -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>
@@ -38,10 +38,12 @@ 
 #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 @@ 
 #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: gcc/graphite.c
===================================================================
--- gcc/graphite.c	(revision 214008)
+++ gcc/graphite.c	(working copy)
@@ -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
Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c	(revision 214008)
+++ gcc/toplev.c	(working copy)
@@ -1275,15 +1275,15 @@ 
   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