OSDN Git Service

2008-09-02 Sebastian Pop <sebastian.pop@amd.com>
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Sep 2008 16:31:04 +0000 (16:31 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Sep 2008 16:31:04 +0000 (16:31 +0000)
    Tobias Grosser  <grosser@fim.uni-passau.de>
    Jan Sjodin  <jan.sjodin@amd.com>
    Harsha Jagasia  <harsha.jagasia@amd.com>
    Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
    Konrad Trifunovic  <konrad.trifunovic@inria.fr>
    Adrien Eliche  <aeliche@isty.uvsq.fr>

Merge from graphite branch.
* configure: Regenerate.
* Makefile.in: Regenerate.
* configure.ac (host_libs): Add ppl and cloog.
Add checks for PPL and CLooG.
* Makefile.def (ppl, cloog): Added modules and dependences.
* Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New.
(HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New.

gcc/
* graphite.c: New.
* graphite.h: New.
* tree-loop-linear.c (perfect_loop_nest_depth): Export.
* doc/invoke.texi (-floop-block, -floop-interchange,
-floop-strip-mine): Document new flags.
* tree-into-ssa.c (gimple_vec): Moved...
* tree-loop-distribution.c (rdg_component): Moved...
* cfgloopmanip.c: Include tree-flow.h.
(update_dominators_in_loop): New.
(create_empty_if_region_on_edge): New.
(create_empty_loop_on_edge): New.
(loopify): Use update_dominators_in_loop.
* tree-pass.h (pass_graphite_transforms): Declared.
* configure: Regenerate.
* tree-phinodes.c (make_phi_node): Export.
(add_phi_node_to_bb): New, split from create_phi_node.
* tree-chrec.c (for_each_scev_op): New.
* tree-chrec.h (for_each_scev_op): Declared.
* tree-ssa-loop-ivopts.c (get_phi_with_result): New.
(remove_statement): Call get_phi_with_result.
* config.in (HAVE_cloog): Undef.
* gdbinit.in (pgg): New.
* timevar.def (TV_GRAPHITE_TRANSFORMS): New.
* tree-ssa-loop.c (graphite_transforms): New.
(gate_graphite_transforms): New.
(pass_graphite_transforms): New.
* configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC,
HAVE_cloog): Defined.
* tree-vectorizer.c (rename_variables_in_bb): Export.
* tree-data-ref.c (dr_may_alias_p): Export.
(stmt_simple_memref_p): New.
(find_data_references_in_stmt): Export.
(find_data_references_in_loop): Export.
(create_rdg_edge_for_ddr): Initialize RDGE_RELATION.
(create_rdg_edges_for_scalar): Initialize RDGE_RELATION.
(create_rdg_vertices): Export.
(build_empty_rdg): New.
(build_rdg): Call build_empty_rdg.  Free dependence_relations.
* tree-data-ref.h (rdg_component): ... here.
(scop_p): New.
(struct data_reference): Add a field scop.
(DR_SCOP): New.
(find_data_references_in_loop): Declared.
(find_data_references_in_stmt): Declared.
(create_rdg_vertices): Declared.
(dr_may_alias_p): Declared.
(stmt_simple_memref_p): Declared.
(struct rdg_edge): Add a field ddr_p relation.
(build_empty_rdg): Declared.
* lambda.h (lambda_matrix): Declare a VEC of.
(find_induction_var_from_exit_cond): Declared.
(lambda_vector_compare): New.
* common.opt (fgraphite, floop-strip-mine,
floop-interchange, floop-block): New flags.
* lambda-code.c (find_induction_var_from_exit_cond): Export.
* cfgloop.c (is_loop_exit): New.
* cfgloop.h (is_loop_exit): Declared.
(create_empty_if_region_on_edge): Declared.
(create_empty_loop_on_edge): Declared.
* tree-flow.h (add_phi_node_to_bb): Declared.
(make_phi_node): Declared.
(rename_variables_in_bb): Declared.
(perfect_loop_nest_depth): Declared.
(graphite_transform_loops): Declared.
* Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H.
(graphite.o-warn): Add -Wno-error.
(PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared.
(LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS.
(INCLUDES): Add PPLINC, CLOOGINC.
(OBJS-common): Add graphite.o.
(graphite.o): Add rule.
* gimple.h (gimple_vec): ... here.
* tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR.
* passes.c (init_optimization_passes): Schedule
pass_graphite_transforms.

testsuite/

* gcc.dg/graphite/scop-{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18}.c: New.
* gcc.dg/graphite/graphite.exp: New.
* gcc.dg/graphite/scop-matmult.c: New.
* gcc.dg/graphite/block-0.c: New.
* lib/target-supports.exp (check_effective_target_fgraphite): New.
* gfortran.dg/graphite/block-1.f90: New.
* gfortran.dg/graphite/scop-{1,2}.f: New.
* gfortran.dg/graphite/block-{1,3,4}.f90: New.
* gfortran.dg/graphite/graphite.exp: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139893 138bc75d-0d04-0410-961f-82ee72b054a4

68 files changed:
ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
configure
configure.ac
gcc/Makefile.in
gcc/cfgloop.c
gcc/cfgloop.h
gcc/cfgloopmanip.c
gcc/common.opt
gcc/config.in
gcc/configure
gcc/configure.ac
gcc/doc/invoke.texi
gcc/gdbinit.in
gcc/gimple.h
gcc/graphite.c [new file with mode: 0644]
gcc/graphite.h [new file with mode: 0644]
gcc/lambda-code.c
gcc/lambda.h
gcc/passes.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/block-0.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/block-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/graphite.exp [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-0.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-12.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-14.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-15.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-16.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-17.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-18.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-9.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/scop-matmult.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/block-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/block-2.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/block-3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/block-4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/graphite.exp [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/scop-1.f [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp
gcc/timevar.def
gcc/tree-cfg.c
gcc/tree-chrec.c
gcc/tree-chrec.h
gcc/tree-data-ref.c
gcc/tree-data-ref.h
gcc/tree-flow.h
gcc/tree-into-ssa.c
gcc/tree-loop-distribution.c
gcc/tree-loop-linear.c
gcc/tree-pass.h
gcc/tree-phinodes.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-loop.c
gcc/tree-vectorizer.c

index 67175b8..0840eb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2008-09-02  Sebastian Pop  <sebastian.pop@amd.com>
+           Tobias Grosser  <grosser@fim.uni-passau.de>
+           Jan Sjodin  <jan.sjodin@amd.com>
+           Harsha Jagasia  <harsha.jagasia@amd.com>
+           Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
+           Konrad Trifunovic  <konrad.trifunovic@inria.fr>
+           Adrien Eliche  <aeliche@isty.uvsq.fr>
+
+       Merge from graphite branch.
+       * configure: Regenerate.
+       * Makefile.in: Regenerate.
+       * configure.ac (host_libs): Add ppl and cloog.
+       Add checks for PPL and CLooG.
+       * Makefile.def (ppl, cloog): Added modules and dependences.
+       * Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New.
+       (HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New.
+
 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
 
        * configure.ac (RPATH_ENVVAR): Use PATH on Windows.
index 832fc42..b5e3815 100644 (file)
@@ -68,6 +68,16 @@ host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
                no_install= true; 
                host="none-${host_vendor}-${host_os}";
                target="none-${host_vendor}-${host_os}"; };
+host_modules= { module= ppl; lib_path=.libs; bootstrap=true;
+               extra_configure_flags='--disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/';
+               no_install= true; 
+               host="none-${host_vendor}-${host_os}";
+               target="none-${host_vendor}-${host_os}"; };
+host_modules= { module= cloog; lib_path=.libs; bootstrap=true;
+               extra_configure_flags='--disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp';
+               no_install= true; 
+               host="none-${host_vendor}-${host_os}";
+               target="none-${host_vendor}-${host_os}"; };
 host_modules= { module= gnuserv; };
 host_modules= { module= gold; bootstrap=true; };
 host_modules= { module= gprof; };
@@ -295,6 +305,8 @@ dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
 dependencies = { module=all-gcc; on=all-gmp; };
 dependencies = { module=all-gcc; on=all-intl; };
 dependencies = { module=all-gcc; on=all-mpfr; };
+dependencies = { module=all-gcc; on=all-ppl; };
+dependencies = { module=all-gcc; on=all-cloog; };
 dependencies = { module=all-gcc; on=all-build-texinfo; };
 dependencies = { module=all-gcc; on=all-build-bison; };
 dependencies = { module=all-gcc; on=all-build-byacc; };
@@ -318,6 +330,9 @@ dependencies = { module=all-fixincludes; on=all-libiberty; };
 dependencies = { module=all-gnattools; on=all-target-libada; };
 
 dependencies = { module=configure-mpfr; on=all-gmp; };
+dependencies = { module=configure-ppl; on=all-gmp; };
+dependencies = { module=configure-ppl; on=all-mpfr; };
+dependencies = { module=configure-cloog; on=all-ppl; };
 
 // Host modules specific to gdb.
 dependencies = { module=configure-gdb; on=all-intl; };
index 0305d28..0f235fd 100644 (file)
@@ -196,6 +196,10 @@ HOST_EXPORTS = \
        TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
        GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
        GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+       PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \
+       PPLINC="$(HOST_PPLINC)"; export PPLINC; \
+       CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
+       CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
 @if gcc-bootstrap
        $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
 @endif gcc-bootstrap
@@ -255,6 +259,14 @@ NORMAL_TARGET_EXPORTS = \
 HOST_GMPLIBS = @gmplibs@
 HOST_GMPINC = @gmpinc@
 
+# Where to find PPL
+HOST_PPLLIBS = @ppllibs@
+HOST_PPLINC = @pplinc@
+
+# Where to find CLOOG
+HOST_CLOOGLIBS = @clooglibs@
+HOST_CLOOGINC = @clooginc@
+
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------
@@ -446,7 +458,7 @@ TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
 
 # This is the list of directories that may be needed in RPATH_ENVVAR
 # so that programs built for the host machine work.
-HOST_LIB_PATH = $(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)$(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)
+HOST_LIB_PATH = $(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)$(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_ppl)$(HOST_LIB_PATH_cloog)
 
 # Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
 @if gcc
@@ -474,6 +486,16 @@ HOST_LIB_PATH_mpfr = \
   $$r/$(HOST_SUBDIR)/mpfr/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/.libs:
 @endif mpfr
 
+@if ppl
+HOST_LIB_PATH_ppl = \
+  $$r/$(HOST_SUBDIR)/ppl/.libs:$$r/$(HOST_SUBDIR)/prev-ppl/.libs:
+@endif ppl
+
+@if cloog
+HOST_LIB_PATH_cloog = \
+  $$r/$(HOST_SUBDIR)/cloog/.libs:$$r/$(HOST_SUBDIR)/prev-cloog/.libs:
+@endif cloog
+
 
 # Flags to pass down to all sub-makes.
 BASE_FLAGS_TO_PASS = \
@@ -676,6 +698,8 @@ configure-host:  \
     maybe-configure-gettext \
     maybe-configure-gmp \
     maybe-configure-mpfr \
+    maybe-configure-ppl \
+    maybe-configure-cloog \
     maybe-configure-gnuserv \
     maybe-configure-gold \
     maybe-configure-gprof \
@@ -815,6 +839,12 @@ all-host: maybe-all-gmp
 @if mpfr-no-bootstrap
 all-host: maybe-all-mpfr
 @endif mpfr-no-bootstrap
+@if ppl-no-bootstrap
+all-host: maybe-all-ppl
+@endif ppl-no-bootstrap
+@if cloog-no-bootstrap
+all-host: maybe-all-cloog
+@endif cloog-no-bootstrap
 all-host: maybe-all-gnuserv
 @if gold-no-bootstrap
 all-host: maybe-all-gold
@@ -943,6 +973,8 @@ info-host: maybe-info-gawk
 info-host: maybe-info-gettext
 info-host: maybe-info-gmp
 info-host: maybe-info-mpfr
+info-host: maybe-info-ppl
+info-host: maybe-info-cloog
 info-host: maybe-info-gnuserv
 info-host: maybe-info-gold
 info-host: maybe-info-gprof
@@ -1050,6 +1082,8 @@ dvi-host: maybe-dvi-gawk
 dvi-host: maybe-dvi-gettext
 dvi-host: maybe-dvi-gmp
 dvi-host: maybe-dvi-mpfr
+dvi-host: maybe-dvi-ppl
+dvi-host: maybe-dvi-cloog
 dvi-host: maybe-dvi-gnuserv
 dvi-host: maybe-dvi-gold
 dvi-host: maybe-dvi-gprof
@@ -1157,6 +1191,8 @@ pdf-host: maybe-pdf-gawk
 pdf-host: maybe-pdf-gettext
 pdf-host: maybe-pdf-gmp
 pdf-host: maybe-pdf-mpfr
+pdf-host: maybe-pdf-ppl
+pdf-host: maybe-pdf-cloog
 pdf-host: maybe-pdf-gnuserv
 pdf-host: maybe-pdf-gold
 pdf-host: maybe-pdf-gprof
@@ -1264,6 +1300,8 @@ html-host: maybe-html-gawk
 html-host: maybe-html-gettext
 html-host: maybe-html-gmp
 html-host: maybe-html-mpfr
+html-host: maybe-html-ppl
+html-host: maybe-html-cloog
 html-host: maybe-html-gnuserv
 html-host: maybe-html-gold
 html-host: maybe-html-gprof
@@ -1371,6 +1409,8 @@ TAGS-host: maybe-TAGS-gawk
 TAGS-host: maybe-TAGS-gettext
 TAGS-host: maybe-TAGS-gmp
 TAGS-host: maybe-TAGS-mpfr
+TAGS-host: maybe-TAGS-ppl
+TAGS-host: maybe-TAGS-cloog
 TAGS-host: maybe-TAGS-gnuserv
 TAGS-host: maybe-TAGS-gold
 TAGS-host: maybe-TAGS-gprof
@@ -1478,6 +1518,8 @@ install-info-host: maybe-install-info-gawk
 install-info-host: maybe-install-info-gettext
 install-info-host: maybe-install-info-gmp
 install-info-host: maybe-install-info-mpfr
+install-info-host: maybe-install-info-ppl
+install-info-host: maybe-install-info-cloog
 install-info-host: maybe-install-info-gnuserv
 install-info-host: maybe-install-info-gold
 install-info-host: maybe-install-info-gprof
@@ -1585,6 +1627,8 @@ install-pdf-host: maybe-install-pdf-gawk
 install-pdf-host: maybe-install-pdf-gettext
 install-pdf-host: maybe-install-pdf-gmp
 install-pdf-host: maybe-install-pdf-mpfr
+install-pdf-host: maybe-install-pdf-ppl
+install-pdf-host: maybe-install-pdf-cloog
 install-pdf-host: maybe-install-pdf-gnuserv
 install-pdf-host: maybe-install-pdf-gold
 install-pdf-host: maybe-install-pdf-gprof
@@ -1692,6 +1736,8 @@ install-html-host: maybe-install-html-gawk
 install-html-host: maybe-install-html-gettext
 install-html-host: maybe-install-html-gmp
 install-html-host: maybe-install-html-mpfr
+install-html-host: maybe-install-html-ppl
+install-html-host: maybe-install-html-cloog
 install-html-host: maybe-install-html-gnuserv
 install-html-host: maybe-install-html-gold
 install-html-host: maybe-install-html-gprof
@@ -1799,6 +1845,8 @@ installcheck-host: maybe-installcheck-gawk
 installcheck-host: maybe-installcheck-gettext
 installcheck-host: maybe-installcheck-gmp
 installcheck-host: maybe-installcheck-mpfr
+installcheck-host: maybe-installcheck-ppl
+installcheck-host: maybe-installcheck-cloog
 installcheck-host: maybe-installcheck-gnuserv
 installcheck-host: maybe-installcheck-gold
 installcheck-host: maybe-installcheck-gprof
@@ -1906,6 +1954,8 @@ mostlyclean-host: maybe-mostlyclean-gawk
 mostlyclean-host: maybe-mostlyclean-gettext
 mostlyclean-host: maybe-mostlyclean-gmp
 mostlyclean-host: maybe-mostlyclean-mpfr
+mostlyclean-host: maybe-mostlyclean-ppl
+mostlyclean-host: maybe-mostlyclean-cloog
 mostlyclean-host: maybe-mostlyclean-gnuserv
 mostlyclean-host: maybe-mostlyclean-gold
 mostlyclean-host: maybe-mostlyclean-gprof
@@ -2013,6 +2063,8 @@ clean-host: maybe-clean-gawk
 clean-host: maybe-clean-gettext
 clean-host: maybe-clean-gmp
 clean-host: maybe-clean-mpfr
+clean-host: maybe-clean-ppl
+clean-host: maybe-clean-cloog
 clean-host: maybe-clean-gnuserv
 clean-host: maybe-clean-gold
 clean-host: maybe-clean-gprof
@@ -2120,6 +2172,8 @@ distclean-host: maybe-distclean-gawk
 distclean-host: maybe-distclean-gettext
 distclean-host: maybe-distclean-gmp
 distclean-host: maybe-distclean-mpfr
+distclean-host: maybe-distclean-ppl
+distclean-host: maybe-distclean-cloog
 distclean-host: maybe-distclean-gnuserv
 distclean-host: maybe-distclean-gold
 distclean-host: maybe-distclean-gprof
@@ -2227,6 +2281,8 @@ maintainer-clean-host: maybe-maintainer-clean-gawk
 maintainer-clean-host: maybe-maintainer-clean-gettext
 maintainer-clean-host: maybe-maintainer-clean-gmp
 maintainer-clean-host: maybe-maintainer-clean-mpfr
+maintainer-clean-host: maybe-maintainer-clean-ppl
+maintainer-clean-host: maybe-maintainer-clean-cloog
 maintainer-clean-host: maybe-maintainer-clean-gnuserv
 maintainer-clean-host: maybe-maintainer-clean-gold
 maintainer-clean-host: maybe-maintainer-clean-gprof
@@ -2388,6 +2444,8 @@ check-host:  \
     maybe-check-gettext \
     maybe-check-gmp \
     maybe-check-mpfr \
+    maybe-check-ppl \
+    maybe-check-cloog \
     maybe-check-gnuserv \
     maybe-check-gold \
     maybe-check-gprof \
@@ -2521,6 +2579,8 @@ install-host-nogcc:  \
     maybe-install-gettext \
     maybe-install-gmp \
     maybe-install-mpfr \
+    maybe-install-ppl \
+    maybe-install-cloog \
     maybe-install-gnuserv \
     maybe-install-gold \
     maybe-install-gprof \
@@ -2595,6 +2655,8 @@ install-host:  \
     maybe-install-gettext \
     maybe-install-gmp \
     maybe-install-mpfr \
+    maybe-install-ppl \
+    maybe-install-cloog \
     maybe-install-gnuserv \
     maybe-install-gold \
     maybe-install-gprof \
@@ -16845,17 +16907,1931 @@ maybe-installcheck-gmp:
 @if gmp
 maybe-installcheck-gmp: installcheck-gmp
 
-installcheck-gmp: \
-    configure-gmp 
-       @[ -f ./gmp/Makefile ] || exit 0; \
+installcheck-gmp: \
+    configure-gmp 
+       @[ -f ./gmp/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing installcheck in gmp" ; \
+       (cd $(HOST_SUBDIR)/gmp && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 installcheck) \
+         || exit 1
+
+@endif gmp
+
+.PHONY: maybe-mostlyclean-gmp mostlyclean-gmp
+maybe-mostlyclean-gmp:
+@if gmp
+maybe-mostlyclean-gmp: mostlyclean-gmp
+
+mostlyclean-gmp: 
+       @[ -f ./gmp/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing mostlyclean in gmp" ; \
+       (cd $(HOST_SUBDIR)/gmp && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 mostlyclean) \
+         || exit 1
+
+@endif gmp
+
+.PHONY: maybe-clean-gmp clean-gmp
+maybe-clean-gmp:
+@if gmp
+maybe-clean-gmp: clean-gmp
+
+clean-gmp: 
+       @[ -f ./gmp/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing clean in gmp" ; \
+       (cd $(HOST_SUBDIR)/gmp && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 clean) \
+         || exit 1
+
+@endif gmp
+
+.PHONY: maybe-distclean-gmp distclean-gmp
+maybe-distclean-gmp:
+@if gmp
+maybe-distclean-gmp: distclean-gmp
+
+distclean-gmp: 
+       @[ -f ./gmp/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing distclean in gmp" ; \
+       (cd $(HOST_SUBDIR)/gmp && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 distclean) \
+         || exit 1
+
+@endif gmp
+
+.PHONY: maybe-maintainer-clean-gmp maintainer-clean-gmp
+maybe-maintainer-clean-gmp:
+@if gmp
+maybe-maintainer-clean-gmp: maintainer-clean-gmp
+
+maintainer-clean-gmp: 
+       @[ -f ./gmp/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing maintainer-clean in gmp" ; \
+       (cd $(HOST_SUBDIR)/gmp && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 maintainer-clean) \
+         || exit 1
+
+@endif gmp
+
+
+
+.PHONY: configure-mpfr maybe-configure-mpfr
+maybe-configure-mpfr:
+@if gcc-bootstrap
+configure-mpfr: stage_current
+@endif gcc-bootstrap
+@if mpfr
+maybe-configure-mpfr: configure-mpfr
+configure-mpfr: 
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       $(HOST_EXPORTS) \
+       echo Configuring in $(HOST_SUBDIR)/mpfr; \
+       cd "$(HOST_SUBDIR)/mpfr" || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp \
+         || exit 1
+@endif mpfr
+
+
+
+.PHONY: configure-stage1-mpfr maybe-configure-stage1-mpfr
+maybe-configure-stage1-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage1-mpfr: configure-stage1-mpfr
+configure-stage1-mpfr:
+       @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS)  \
+       CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+          \
+         --disable-intermodule $(STAGE1_CHECKING)        --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stage2-mpfr maybe-configure-stage2-mpfr
+maybe-configure-stage2-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage2-mpfr: configure-stage2-mpfr
+configure-stage2-mpfr:
+       @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stageb2g0-mpfr maybe-configure-stageb2g0-mpfr
+maybe-configure-stageb2g0-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stageb2g0-mpfr: configure-stageb2g0-mpfr
+configure-stageb2g0-mpfr:
+       @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+       CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS;  \
+       echo Configuring stage b2g0 in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr
+maybe-configure-stage3-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage3-mpfr: configure-stage3-mpfr
+configure-stage3-mpfr:
+       @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stageb3g2-mpfr maybe-configure-stageb3g2-mpfr
+maybe-configure-stageb3g2-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stageb3g2-mpfr: configure-stageb3g2-mpfr
+configure-stageb3g2-mpfr:
+       @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+       CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS;  \
+       echo Configuring stage b3g2 in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stage4-mpfr maybe-configure-stage4-mpfr
+maybe-configure-stage4-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage4-mpfr: configure-stage4-mpfr
+configure-stage4-mpfr:
+       @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stageprofile-mpfr maybe-configure-stageprofile-mpfr
+maybe-configure-stageprofile-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stageprofile-mpfr: configure-stageprofile-mpfr
+configure-stageprofile-mpfr:
+       @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+       CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS;  \
+       echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stagefeedback-mpfr maybe-configure-stagefeedback-mpfr
+maybe-configure-stagefeedback-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stagefeedback-mpfr: configure-stagefeedback-mpfr
+configure-stagefeedback-mpfr:
+       @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+       CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS;  \
+       echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/mpfr"; \
+       libsrcdir="$$s/mpfr"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+
+
+
+
+.PHONY: all-mpfr maybe-all-mpfr
+maybe-all-mpfr:
+@if gcc-bootstrap
+all-mpfr: stage_current
+@endif gcc-bootstrap
+@if mpfr
+TARGET-mpfr=all
+maybe-all-mpfr: all-mpfr
+all-mpfr: configure-mpfr
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
+               $(TARGET-mpfr))
+@endif mpfr
+
+
+
+.PHONY: all-stage1-mpfr maybe-all-stage1-mpfr
+.PHONY: clean-stage1-mpfr maybe-clean-stage1-mpfr
+maybe-all-stage1-mpfr:
+maybe-clean-stage1-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage1-mpfr: all-stage1-mpfr
+all-stage1: all-stage1-mpfr
+TARGET-stage1-mpfr = $(TARGET-mpfr)
+all-stage1-mpfr: configure-stage1-mpfr
+       @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
+               LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS)   \
+               $(TARGET-stage1-mpfr)
+
+maybe-clean-stage1-mpfr: clean-stage1-mpfr
+clean-stage1: clean-stage1-mpfr
+clean-stage1-mpfr:
+       @if [ $(current_stage) = stage1 ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage1-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stage1-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stage2-mpfr maybe-all-stage2-mpfr
+.PHONY: clean-stage2-mpfr maybe-clean-stage2-mpfr
+maybe-all-stage2-mpfr:
+maybe-clean-stage2-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage2-mpfr: all-stage2-mpfr
+all-stage2: all-stage2-mpfr
+TARGET-stage2-mpfr = $(TARGET-mpfr)
+all-stage2-mpfr: configure-stage2-mpfr
+       @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
+               LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stage2-mpfr)
+
+maybe-clean-stage2-mpfr: clean-stage2-mpfr
+clean-stage2: clean-stage2-mpfr
+clean-stage2-mpfr:
+       @if [ $(current_stage) = stage2 ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage2-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stage2-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stageb2g0-mpfr maybe-all-stageb2g0-mpfr
+.PHONY: clean-stageb2g0-mpfr maybe-clean-stageb2g0-mpfr
+maybe-all-stageb2g0-mpfr:
+maybe-clean-stageb2g0-mpfr:
+@if mpfr-bootstrap
+maybe-all-stageb2g0-mpfr: all-stageb2g0-mpfr
+all-stageb2g0: all-stageb2g0-mpfr
+TARGET-stageb2g0-mpfr = $(TARGET-mpfr)
+all-stageb2g0-mpfr: configure-stageb2g0-mpfr
+       @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
+               LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
+               CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
+               CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stageb2g0-mpfr)
+
+maybe-clean-stageb2g0-mpfr: clean-stageb2g0-mpfr
+clean-stageb2g0: clean-stageb2g0-mpfr
+clean-stageb2g0-mpfr:
+       @if [ $(current_stage) = stageb2g0 ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stageb2g0-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stageb2g0-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stage3-mpfr maybe-all-stage3-mpfr
+.PHONY: clean-stage3-mpfr maybe-clean-stage3-mpfr
+maybe-all-stage3-mpfr:
+maybe-clean-stage3-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage3-mpfr: all-stage3-mpfr
+all-stage3: all-stage3-mpfr
+TARGET-stage3-mpfr = $(TARGET-mpfr)
+all-stage3-mpfr: configure-stage3-mpfr
+       @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
+               LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stage3-mpfr)
+
+maybe-clean-stage3-mpfr: clean-stage3-mpfr
+clean-stage3: clean-stage3-mpfr
+clean-stage3-mpfr:
+       @if [ $(current_stage) = stage3 ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage3-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stage3-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stageb3g2-mpfr maybe-all-stageb3g2-mpfr
+.PHONY: clean-stageb3g2-mpfr maybe-clean-stageb3g2-mpfr
+maybe-all-stageb3g2-mpfr:
+maybe-clean-stageb3g2-mpfr:
+@if mpfr-bootstrap
+maybe-all-stageb3g2-mpfr: all-stageb3g2-mpfr
+all-stageb3g2: all-stageb3g2-mpfr
+TARGET-stageb3g2-mpfr = $(TARGET-mpfr)
+all-stageb3g2-mpfr: configure-stageb3g2-mpfr
+       @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
+               LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
+               CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
+               CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stageb3g2-mpfr)
+
+maybe-clean-stageb3g2-mpfr: clean-stageb3g2-mpfr
+clean-stageb3g2: clean-stageb3g2-mpfr
+clean-stageb3g2-mpfr:
+       @if [ $(current_stage) = stageb3g2 ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stageb3g2-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stageb3g2-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stage4-mpfr maybe-all-stage4-mpfr
+.PHONY: clean-stage4-mpfr maybe-clean-stage4-mpfr
+maybe-all-stage4-mpfr:
+maybe-clean-stage4-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage4-mpfr: all-stage4-mpfr
+all-stage4: all-stage4-mpfr
+TARGET-stage4-mpfr = $(TARGET-mpfr)
+all-stage4-mpfr: configure-stage4-mpfr
+       @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
+               LIBCFLAGS="$(STAGE4_CFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stage4-mpfr)
+
+maybe-clean-stage4-mpfr: clean-stage4-mpfr
+clean-stage4: clean-stage4-mpfr
+clean-stage4-mpfr:
+       @if [ $(current_stage) = stage4 ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage4-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stage4-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stageprofile-mpfr maybe-all-stageprofile-mpfr
+.PHONY: clean-stageprofile-mpfr maybe-clean-stageprofile-mpfr
+maybe-all-stageprofile-mpfr:
+maybe-clean-stageprofile-mpfr:
+@if mpfr-bootstrap
+maybe-all-stageprofile-mpfr: all-stageprofile-mpfr
+all-stageprofile: all-stageprofile-mpfr
+TARGET-stageprofile-mpfr = $(TARGET-mpfr)
+all-stageprofile-mpfr: configure-stageprofile-mpfr
+       @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
+               LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stageprofile-mpfr)
+
+maybe-clean-stageprofile-mpfr: clean-stageprofile-mpfr
+clean-stageprofile: clean-stageprofile-mpfr
+clean-stageprofile-mpfr:
+       @if [ $(current_stage) = stageprofile ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stageprofile-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stageprofile-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stagefeedback-mpfr maybe-all-stagefeedback-mpfr
+.PHONY: clean-stagefeedback-mpfr maybe-clean-stagefeedback-mpfr
+maybe-all-stagefeedback-mpfr:
+maybe-clean-stagefeedback-mpfr:
+@if mpfr-bootstrap
+maybe-all-stagefeedback-mpfr: all-stagefeedback-mpfr
+all-stagefeedback: all-stagefeedback-mpfr
+TARGET-stagefeedback-mpfr = $(TARGET-mpfr)
+all-stagefeedback-mpfr: configure-stagefeedback-mpfr
+       @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
+               LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
+               CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
+               CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stagefeedback-mpfr)
+
+maybe-clean-stagefeedback-mpfr: clean-stagefeedback-mpfr
+clean-stagefeedback: clean-stagefeedback-mpfr
+clean-stagefeedback-mpfr:
+       @if [ $(current_stage) = stagefeedback ]; then \
+         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stagefeedback-mpfr/Makefile ] || exit 0; \
+         $(MAKE) stagefeedback-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/mpfr && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif mpfr-bootstrap
+
+
+
+
+
+.PHONY: check-mpfr maybe-check-mpfr
+maybe-check-mpfr:
+@if mpfr
+maybe-check-mpfr: check-mpfr
+
+check-mpfr:
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
+
+@endif mpfr
+
+.PHONY: install-mpfr maybe-install-mpfr
+maybe-install-mpfr:
+@if mpfr
+maybe-install-mpfr: install-mpfr
+
+install-mpfr:
+
+@endif mpfr
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-mpfr info-mpfr
+maybe-info-mpfr:
+@if mpfr
+maybe-info-mpfr: info-mpfr
+
+info-mpfr: \
+    configure-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing info in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 info) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-dvi-mpfr dvi-mpfr
+maybe-dvi-mpfr:
+@if mpfr
+maybe-dvi-mpfr: dvi-mpfr
+
+dvi-mpfr: \
+    configure-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing dvi in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 dvi) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-pdf-mpfr pdf-mpfr
+maybe-pdf-mpfr:
+@if mpfr
+maybe-pdf-mpfr: pdf-mpfr
+
+pdf-mpfr: \
+    configure-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing pdf in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 pdf) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-html-mpfr html-mpfr
+maybe-html-mpfr:
+@if mpfr
+maybe-html-mpfr: html-mpfr
+
+html-mpfr: \
+    configure-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 html) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-TAGS-mpfr TAGS-mpfr
+maybe-TAGS-mpfr:
+@if mpfr
+maybe-TAGS-mpfr: TAGS-mpfr
+
+TAGS-mpfr: \
+    configure-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 TAGS) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-install-info-mpfr install-info-mpfr
+maybe-install-info-mpfr:
+@if mpfr
+maybe-install-info-mpfr: install-info-mpfr
+
+install-info-mpfr: \
+    configure-mpfr \
+    info-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-info in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-info) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-install-pdf-mpfr install-pdf-mpfr
+maybe-install-pdf-mpfr:
+@if mpfr
+maybe-install-pdf-mpfr: install-pdf-mpfr
+
+install-pdf-mpfr: \
+    configure-mpfr \
+    pdf-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-pdf in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-pdf) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-install-html-mpfr install-html-mpfr
+maybe-install-html-mpfr:
+@if mpfr
+maybe-install-html-mpfr: install-html-mpfr
+
+install-html-mpfr: \
+    configure-mpfr \
+    html-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-html in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-html) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-installcheck-mpfr installcheck-mpfr
+maybe-installcheck-mpfr:
+@if mpfr
+maybe-installcheck-mpfr: installcheck-mpfr
+
+installcheck-mpfr: \
+    configure-mpfr 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing installcheck in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 installcheck) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-mostlyclean-mpfr mostlyclean-mpfr
+maybe-mostlyclean-mpfr:
+@if mpfr
+maybe-mostlyclean-mpfr: mostlyclean-mpfr
+
+mostlyclean-mpfr: 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing mostlyclean in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 mostlyclean) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-clean-mpfr clean-mpfr
+maybe-clean-mpfr:
+@if mpfr
+maybe-clean-mpfr: clean-mpfr
+
+clean-mpfr: 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing clean in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 clean) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-distclean-mpfr distclean-mpfr
+maybe-distclean-mpfr:
+@if mpfr
+maybe-distclean-mpfr: distclean-mpfr
+
+distclean-mpfr: 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing distclean in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 distclean) \
+         || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-maintainer-clean-mpfr maintainer-clean-mpfr
+maybe-maintainer-clean-mpfr:
+@if mpfr
+maybe-maintainer-clean-mpfr: maintainer-clean-mpfr
+
+maintainer-clean-mpfr: 
+       @[ -f ./mpfr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing maintainer-clean in mpfr" ; \
+       (cd $(HOST_SUBDIR)/mpfr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 maintainer-clean) \
+         || exit 1
+
+@endif mpfr
+
+
+
+.PHONY: configure-ppl maybe-configure-ppl
+maybe-configure-ppl:
+@if gcc-bootstrap
+configure-ppl: stage_current
+@endif gcc-bootstrap
+@if ppl
+maybe-configure-ppl: configure-ppl
+configure-ppl: 
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       $(HOST_EXPORTS) \
+       echo Configuring in $(HOST_SUBDIR)/ppl; \
+       cd "$(HOST_SUBDIR)/ppl" || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/ \
+         || exit 1
+@endif ppl
+
+
+
+.PHONY: configure-stage1-ppl maybe-configure-stage1-ppl
+maybe-configure-stage1-ppl:
+@if ppl-bootstrap
+maybe-configure-stage1-ppl: configure-stage1-ppl
+configure-stage1-ppl:
+       @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS)  \
+       CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 1 in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+          \
+         --disable-intermodule $(STAGE1_CHECKING)        --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stage2-ppl maybe-configure-stage2-ppl
+maybe-configure-stage2-ppl:
+@if ppl-bootstrap
+maybe-configure-stage2-ppl: configure-stage2-ppl
+configure-stage2-ppl:
+       @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 2 in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stageb2g0-ppl maybe-configure-stageb2g0-ppl
+maybe-configure-stageb2g0-ppl:
+@if ppl-bootstrap
+maybe-configure-stageb2g0-ppl: configure-stageb2g0-ppl
+configure-stageb2g0-ppl:
+       @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+       CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS;  \
+       echo Configuring stage b2g0 in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stage3-ppl maybe-configure-stage3-ppl
+maybe-configure-stage3-ppl:
+@if ppl-bootstrap
+maybe-configure-stage3-ppl: configure-stage3-ppl
+configure-stage3-ppl:
+       @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 3 in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stageb3g2-ppl maybe-configure-stageb3g2-ppl
+maybe-configure-stageb3g2-ppl:
+@if ppl-bootstrap
+maybe-configure-stageb3g2-ppl: configure-stageb3g2-ppl
+configure-stageb3g2-ppl:
+       @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+       CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS;  \
+       echo Configuring stage b3g2 in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stage4-ppl maybe-configure-stage4-ppl
+maybe-configure-stage4-ppl:
+@if ppl-bootstrap
+maybe-configure-stage4-ppl: configure-stage4-ppl
+configure-stage4-ppl:
+       @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+       CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS;  \
+       echo Configuring stage 4 in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stageprofile-ppl maybe-configure-stageprofile-ppl
+maybe-configure-stageprofile-ppl:
+@if ppl-bootstrap
+maybe-configure-stageprofile-ppl: configure-stageprofile-ppl
+configure-stageprofile-ppl:
+       @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+       CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS;  \
+       echo Configuring stage profile in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+.PHONY: configure-stagefeedback-ppl maybe-configure-stagefeedback-ppl
+maybe-configure-stagefeedback-ppl:
+@if ppl-bootstrap
+maybe-configure-stagefeedback-ppl: configure-stagefeedback-ppl
+configure-stagefeedback-ppl:
+       @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS)  \
+       CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+       CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS;  \
+       echo Configuring stage feedback in $(HOST_SUBDIR)/ppl ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+       cd $(HOST_SUBDIR)/ppl || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/ppl"; \
+       libsrcdir="$$s/ppl"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+         --with-build-libsubdir=$(HOST_SUBDIR) \
+         @stage2_werror_flag@ --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
+@endif ppl-bootstrap
+
+
+
+
+
+.PHONY: all-ppl maybe-all-ppl
+maybe-all-ppl:
+@if gcc-bootstrap
+all-ppl: stage_current
+@endif gcc-bootstrap
+@if ppl
+TARGET-ppl=all
+maybe-all-ppl: all-ppl
+all-ppl: configure-ppl
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
+               $(TARGET-ppl))
+@endif ppl
+
+
+
+.PHONY: all-stage1-ppl maybe-all-stage1-ppl
+.PHONY: clean-stage1-ppl maybe-clean-stage1-ppl
+maybe-all-stage1-ppl:
+maybe-clean-stage1-ppl:
+@if ppl-bootstrap
+maybe-all-stage1-ppl: all-stage1-ppl
+all-stage1: all-stage1-ppl
+TARGET-stage1-ppl = $(TARGET-ppl)
+all-stage1-ppl: configure-stage1-ppl
+       @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
+               LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS)   \
+               $(TARGET-stage1-ppl)
+
+maybe-clean-stage1-ppl: clean-stage1-ppl
+clean-stage1: clean-stage1-ppl
+clean-stage1-ppl:
+       @if [ $(current_stage) = stage1 ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage1-ppl/Makefile ] || exit 0; \
+         $(MAKE) stage1-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stage2-ppl maybe-all-stage2-ppl
+.PHONY: clean-stage2-ppl maybe-clean-stage2-ppl
+maybe-all-stage2-ppl:
+maybe-clean-stage2-ppl:
+@if ppl-bootstrap
+maybe-all-stage2-ppl: all-stage2-ppl
+all-stage2: all-stage2-ppl
+TARGET-stage2-ppl = $(TARGET-ppl)
+all-stage2-ppl: configure-stage2-ppl
+       @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
+               LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stage2-ppl)
+
+maybe-clean-stage2-ppl: clean-stage2-ppl
+clean-stage2: clean-stage2-ppl
+clean-stage2-ppl:
+       @if [ $(current_stage) = stage2 ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage2-ppl/Makefile ] || exit 0; \
+         $(MAKE) stage2-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stageb2g0-ppl maybe-all-stageb2g0-ppl
+.PHONY: clean-stageb2g0-ppl maybe-clean-stageb2g0-ppl
+maybe-all-stageb2g0-ppl:
+maybe-clean-stageb2g0-ppl:
+@if ppl-bootstrap
+maybe-all-stageb2g0-ppl: all-stageb2g0-ppl
+all-stageb2g0: all-stageb2g0-ppl
+TARGET-stageb2g0-ppl = $(TARGET-ppl)
+all-stageb2g0-ppl: configure-stageb2g0-ppl
+       @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
+               LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
+               CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
+               CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stageb2g0-ppl)
+
+maybe-clean-stageb2g0-ppl: clean-stageb2g0-ppl
+clean-stageb2g0: clean-stageb2g0-ppl
+clean-stageb2g0-ppl:
+       @if [ $(current_stage) = stageb2g0 ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stageb2g0-ppl/Makefile ] || exit 0; \
+         $(MAKE) stageb2g0-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stage3-ppl maybe-all-stage3-ppl
+.PHONY: clean-stage3-ppl maybe-clean-stage3-ppl
+maybe-all-stage3-ppl:
+maybe-clean-stage3-ppl:
+@if ppl-bootstrap
+maybe-all-stage3-ppl: all-stage3-ppl
+all-stage3: all-stage3-ppl
+TARGET-stage3-ppl = $(TARGET-ppl)
+all-stage3-ppl: configure-stage3-ppl
+       @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
+               LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stage3-ppl)
+
+maybe-clean-stage3-ppl: clean-stage3-ppl
+clean-stage3: clean-stage3-ppl
+clean-stage3-ppl:
+       @if [ $(current_stage) = stage3 ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage3-ppl/Makefile ] || exit 0; \
+         $(MAKE) stage3-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stageb3g2-ppl maybe-all-stageb3g2-ppl
+.PHONY: clean-stageb3g2-ppl maybe-clean-stageb3g2-ppl
+maybe-all-stageb3g2-ppl:
+maybe-clean-stageb3g2-ppl:
+@if ppl-bootstrap
+maybe-all-stageb3g2-ppl: all-stageb3g2-ppl
+all-stageb3g2: all-stageb3g2-ppl
+TARGET-stageb3g2-ppl = $(TARGET-ppl)
+all-stageb3g2-ppl: configure-stageb3g2-ppl
+       @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
+               LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
+               CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
+               CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stageb3g2-ppl)
+
+maybe-clean-stageb3g2-ppl: clean-stageb3g2-ppl
+clean-stageb3g2: clean-stageb3g2-ppl
+clean-stageb3g2-ppl:
+       @if [ $(current_stage) = stageb3g2 ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stageb3g2-ppl/Makefile ] || exit 0; \
+         $(MAKE) stageb3g2-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stage4-ppl maybe-all-stage4-ppl
+.PHONY: clean-stage4-ppl maybe-clean-stage4-ppl
+maybe-all-stage4-ppl:
+maybe-clean-stage4-ppl:
+@if ppl-bootstrap
+maybe-all-stage4-ppl: all-stage4-ppl
+all-stage4: all-stage4-ppl
+TARGET-stage4-ppl = $(TARGET-ppl)
+all-stage4-ppl: configure-stage4-ppl
+       @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
+               LIBCFLAGS="$(STAGE4_CFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stage4-ppl)
+
+maybe-clean-stage4-ppl: clean-stage4-ppl
+clean-stage4: clean-stage4-ppl
+clean-stage4-ppl:
+       @if [ $(current_stage) = stage4 ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stage4-ppl/Makefile ] || exit 0; \
+         $(MAKE) stage4-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stageprofile-ppl maybe-all-stageprofile-ppl
+.PHONY: clean-stageprofile-ppl maybe-clean-stageprofile-ppl
+maybe-all-stageprofile-ppl:
+maybe-clean-stageprofile-ppl:
+@if ppl-bootstrap
+maybe-all-stageprofile-ppl: all-stageprofile-ppl
+all-stageprofile: all-stageprofile-ppl
+TARGET-stageprofile-ppl = $(TARGET-ppl)
+all-stageprofile-ppl: configure-stageprofile-ppl
+       @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
+               LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
+               CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
+               CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stageprofile-ppl)
+
+maybe-clean-stageprofile-ppl: clean-stageprofile-ppl
+clean-stageprofile: clean-stageprofile-ppl
+clean-stageprofile-ppl:
+       @if [ $(current_stage) = stageprofile ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stageprofile-ppl/Makefile ] || exit 0; \
+         $(MAKE) stageprofile-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+.PHONY: all-stagefeedback-ppl maybe-all-stagefeedback-ppl
+.PHONY: clean-stagefeedback-ppl maybe-clean-stagefeedback-ppl
+maybe-all-stagefeedback-ppl:
+maybe-clean-stagefeedback-ppl:
+@if ppl-bootstrap
+maybe-all-stagefeedback-ppl: all-stagefeedback-ppl
+all-stagefeedback: all-stagefeedback-ppl
+TARGET-stagefeedback-ppl = $(TARGET-ppl)
+all-stagefeedback-ppl: configure-stagefeedback-ppl
+       @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       $(POSTSTAGE1_HOST_EXPORTS) \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(BASE_FLAGS_TO_PASS) \
+               CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
+               LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
+               CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
+               CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               $(TARGET-stagefeedback-ppl)
+
+maybe-clean-stagefeedback-ppl: clean-stagefeedback-ppl
+clean-stagefeedback: clean-stagefeedback-ppl
+clean-stagefeedback-ppl:
+       @if [ $(current_stage) = stagefeedback ]; then \
+         [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+       else \
+         [ -f $(HOST_SUBDIR)/stagefeedback-ppl/Makefile ] || exit 0; \
+         $(MAKE) stagefeedback-start; \
+       fi; \
+       cd $(HOST_SUBDIR)/ppl && \
+       $(MAKE) $(EXTRA_HOST_FLAGS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                clean
+@endif ppl-bootstrap
+
+
+
+
+
+.PHONY: check-ppl maybe-check-ppl
+maybe-check-ppl:
+@if ppl
+maybe-check-ppl: check-ppl
+
+check-ppl:
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
+
+@endif ppl
+
+.PHONY: install-ppl maybe-install-ppl
+maybe-install-ppl:
+@if ppl
+maybe-install-ppl: install-ppl
+
+install-ppl:
+
+@endif ppl
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-ppl info-ppl
+maybe-info-ppl:
+@if ppl
+maybe-info-ppl: info-ppl
+
+info-ppl: \
+    configure-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing info in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 info) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-dvi-ppl dvi-ppl
+maybe-dvi-ppl:
+@if ppl
+maybe-dvi-ppl: dvi-ppl
+
+dvi-ppl: \
+    configure-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing dvi in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 dvi) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-pdf-ppl pdf-ppl
+maybe-pdf-ppl:
+@if ppl
+maybe-pdf-ppl: pdf-ppl
+
+pdf-ppl: \
+    configure-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing pdf in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 pdf) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-html-ppl html-ppl
+maybe-html-ppl:
+@if ppl
+maybe-html-ppl: html-ppl
+
+html-ppl: \
+    configure-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 html) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-TAGS-ppl TAGS-ppl
+maybe-TAGS-ppl:
+@if ppl
+maybe-TAGS-ppl: TAGS-ppl
+
+TAGS-ppl: \
+    configure-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 TAGS) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-install-info-ppl install-info-ppl
+maybe-install-info-ppl:
+@if ppl
+maybe-install-info-ppl: install-info-ppl
+
+install-info-ppl: \
+    configure-ppl \
+    info-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-info in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-info) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-install-pdf-ppl install-pdf-ppl
+maybe-install-pdf-ppl:
+@if ppl
+maybe-install-pdf-ppl: install-pdf-ppl
+
+install-pdf-ppl: \
+    configure-ppl \
+    pdf-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-pdf in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-pdf) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-install-html-ppl install-html-ppl
+maybe-install-html-ppl:
+@if ppl
+maybe-install-html-ppl: install-html-ppl
+
+install-html-ppl: \
+    configure-ppl \
+    html-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-html in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+                 install-html) \
+         || exit 1
+
+@endif ppl
+
+.PHONY: maybe-installcheck-ppl installcheck-ppl
+maybe-installcheck-ppl:
+@if ppl
+maybe-installcheck-ppl: installcheck-ppl
+
+installcheck-ppl: \
+    configure-ppl 
+       @[ -f ./ppl/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing installcheck in gmp" ; \
-       (cd $(HOST_SUBDIR)/gmp && \
+       echo "Doing installcheck in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16863,23 +18839,23 @@ installcheck-gmp: \
                  installcheck) \
          || exit 1
 
-@endif gmp
+@endif ppl
 
-.PHONY: maybe-mostlyclean-gmp mostlyclean-gmp
-maybe-mostlyclean-gmp:
-@if gmp
-maybe-mostlyclean-gmp: mostlyclean-gmp
+.PHONY: maybe-mostlyclean-ppl mostlyclean-ppl
+maybe-mostlyclean-ppl:
+@if ppl
+maybe-mostlyclean-ppl: mostlyclean-ppl
 
-mostlyclean-gmp
-       @[ -f ./gmp/Makefile ] || exit 0; \
+mostlyclean-ppl
+       @[ -f ./ppl/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing mostlyclean in gmp" ; \
-       (cd $(HOST_SUBDIR)/gmp && \
+       echo "Doing mostlyclean in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16887,23 +18863,23 @@ mostlyclean-gmp:
                  mostlyclean) \
          || exit 1
 
-@endif gmp
+@endif ppl
 
-.PHONY: maybe-clean-gmp clean-gmp
-maybe-clean-gmp:
-@if gmp
-maybe-clean-gmp: clean-gmp
+.PHONY: maybe-clean-ppl clean-ppl
+maybe-clean-ppl:
+@if ppl
+maybe-clean-ppl: clean-ppl
 
-clean-gmp
-       @[ -f ./gmp/Makefile ] || exit 0; \
+clean-ppl
+       @[ -f ./ppl/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing clean in gmp" ; \
-       (cd $(HOST_SUBDIR)/gmp && \
+       echo "Doing clean in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16911,23 +18887,23 @@ clean-gmp:
                  clean) \
          || exit 1
 
-@endif gmp
+@endif ppl
 
-.PHONY: maybe-distclean-gmp distclean-gmp
-maybe-distclean-gmp:
-@if gmp
-maybe-distclean-gmp: distclean-gmp
+.PHONY: maybe-distclean-ppl distclean-ppl
+maybe-distclean-ppl:
+@if ppl
+maybe-distclean-ppl: distclean-ppl
 
-distclean-gmp
-       @[ -f ./gmp/Makefile ] || exit 0; \
+distclean-ppl
+       @[ -f ./ppl/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing distclean in gmp" ; \
-       (cd $(HOST_SUBDIR)/gmp && \
+       echo "Doing distclean in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16935,23 +18911,23 @@ distclean-gmp:
                  distclean) \
          || exit 1
 
-@endif gmp
+@endif ppl
 
-.PHONY: maybe-maintainer-clean-gmp maintainer-clean-gmp
-maybe-maintainer-clean-gmp:
-@if gmp
-maybe-maintainer-clean-gmp: maintainer-clean-gmp
+.PHONY: maybe-maintainer-clean-ppl maintainer-clean-ppl
+maybe-maintainer-clean-ppl:
+@if ppl
+maybe-maintainer-clean-ppl: maintainer-clean-ppl
 
-maintainer-clean-gmp
-       @[ -f ./gmp/Makefile ] || exit 0; \
+maintainer-clean-ppl
+       @[ -f ./ppl/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing maintainer-clean in gmp" ; \
-       (cd $(HOST_SUBDIR)/gmp && \
+       echo "Doing maintainer-clean in ppl" ; \
+       (cd $(HOST_SUBDIR)/ppl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16959,657 +18935,657 @@ maintainer-clean-gmp:
                  maintainer-clean) \
          || exit 1
 
-@endif gmp
+@endif ppl
 
 
 
-.PHONY: configure-mpfr maybe-configure-mpfr
-maybe-configure-mpfr:
+.PHONY: configure-cloog maybe-configure-cloog
+maybe-configure-cloog:
 @if gcc-bootstrap
-configure-mpfr: stage_current
+configure-cloog: stage_current
 @endif gcc-bootstrap
-@if mpfr
-maybe-configure-mpfr: configure-mpfr
-configure-mpfr
+@if cloog
+maybe-configure-cloog: configure-cloog
+configure-cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
        $(HOST_EXPORTS) \
-       echo Configuring in $(HOST_SUBDIR)/mpfr; \
-       cd "$(HOST_SUBDIR)/mpfr" || exit 1; \
+       echo Configuring in $(HOST_SUBDIR)/cloog; \
+       cd "$(HOST_SUBDIR)/cloog" || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
-         --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp \
+         --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp \
          || exit 1
-@endif mpfr
+@endif cloog
 
 
 
-.PHONY: configure-stage1-mpfr maybe-configure-stage1-mpfr
-maybe-configure-stage1-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stage1-mpfr: configure-stage1-mpfr
-configure-stage1-mpfr:
+.PHONY: configure-stage1-cloog maybe-configure-stage1-cloog
+maybe-configure-stage1-cloog:
+@if cloog-bootstrap
+maybe-configure-stage1-cloog: configure-stage1-cloog
+configure-stage1-cloog:
        @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS)  \
        CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
        CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS;  \
-       echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage 1 in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
           \
-         --disable-intermodule $(STAGE1_CHECKING)        --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stage2-mpfr maybe-configure-stage2-mpfr
-maybe-configure-stage2-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stage2-mpfr: configure-stage2-mpfr
-configure-stage2-mpfr:
+         --disable-intermodule $(STAGE1_CHECKING)        --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stage2-cloog maybe-configure-stage2-cloog
+maybe-configure-stage2-cloog:
+@if cloog-bootstrap
+maybe-configure-stage2-cloog: configure-stage2-cloog
+configure-stage2-cloog:
        @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
        CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS;  \
-       echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage 2 in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stageb2g0-mpfr maybe-configure-stageb2g0-mpfr
-maybe-configure-stageb2g0-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stageb2g0-mpfr: configure-stageb2g0-mpfr
-configure-stageb2g0-mpfr:
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stageb2g0-cloog maybe-configure-stageb2g0-cloog
+maybe-configure-stageb2g0-cloog:
+@if cloog-bootstrap
+maybe-configure-stageb2g0-cloog: configure-stageb2g0-cloog
+configure-stageb2g0-cloog:
        @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
        CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS;  \
-       echo Configuring stage b2g0 in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage b2g0 in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr
-maybe-configure-stage3-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stage3-mpfr: configure-stage3-mpfr
-configure-stage3-mpfr:
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stage3-cloog maybe-configure-stage3-cloog
+maybe-configure-stage3-cloog:
+@if cloog-bootstrap
+maybe-configure-stage3-cloog: configure-stage3-cloog
+configure-stage3-cloog:
        @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
        CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS;  \
-       echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage 3 in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stageb3g2-mpfr maybe-configure-stageb3g2-mpfr
-maybe-configure-stageb3g2-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stageb3g2-mpfr: configure-stageb3g2-mpfr
-configure-stageb3g2-mpfr:
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stageb3g2-cloog maybe-configure-stageb3g2-cloog
+maybe-configure-stageb3g2-cloog:
+@if cloog-bootstrap
+maybe-configure-stageb3g2-cloog: configure-stageb3g2-cloog
+configure-stageb3g2-cloog:
        @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
        CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS;  \
-       echo Configuring stage b3g2 in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage b3g2 in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stage4-mpfr maybe-configure-stage4-mpfr
-maybe-configure-stage4-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stage4-mpfr: configure-stage4-mpfr
-configure-stage4-mpfr:
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stage4-cloog maybe-configure-stage4-cloog
+maybe-configure-stage4-cloog:
+@if cloog-bootstrap
+maybe-configure-stage4-cloog: configure-stage4-cloog
+configure-stage4-cloog:
        @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
        CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS;  \
-       echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage 4 in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stageprofile-mpfr maybe-configure-stageprofile-mpfr
-maybe-configure-stageprofile-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stageprofile-mpfr: configure-stageprofile-mpfr
-configure-stageprofile-mpfr:
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stageprofile-cloog maybe-configure-stageprofile-cloog
+maybe-configure-stageprofile-cloog:
+@if cloog-bootstrap
+maybe-configure-stageprofile-cloog: configure-stageprofile-cloog
+configure-stageprofile-cloog:
        @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
        CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS;  \
-       echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage profile in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
-
-.PHONY: configure-stagefeedback-mpfr maybe-configure-stagefeedback-mpfr
-maybe-configure-stagefeedback-mpfr:
-@if mpfr-bootstrap
-maybe-configure-stagefeedback-mpfr: configure-stagefeedback-mpfr
-configure-stagefeedback-mpfr:
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
+
+.PHONY: configure-stagefeedback-cloog maybe-configure-stagefeedback-cloog
+maybe-configure-stagefeedback-cloog:
+@if cloog-bootstrap
+maybe-configure-stagefeedback-cloog: configure-stagefeedback-cloog
+configure-stagefeedback-cloog:
        @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
-       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+       @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+       test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS)  \
        CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
        CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS;  \
-       echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
-       cd $(HOST_SUBDIR)/mpfr || exit 1; \
+       echo Configuring stage feedback in $(HOST_SUBDIR)/cloog ; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
+       cd $(HOST_SUBDIR)/cloog || exit 1; \
        case $(srcdir) in \
          /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-         *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+         *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
                sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       srcdiroption="--srcdir=$${topdir}/mpfr"; \
-       libsrcdir="$$s/mpfr"; \
+       srcdiroption="--srcdir=$${topdir}/cloog"; \
+       libsrcdir="$$s/cloog"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
          --target=none-${host_vendor}-${host_os} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
-@endif mpfr-bootstrap
+         @stage2_werror_flag@ --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-ppl=$$r/$(HOST_SUBDIR)/ppl/ --with-bits=gmp
+@endif cloog-bootstrap
 
 
 
 
 
-.PHONY: all-mpfr maybe-all-mpfr
-maybe-all-mpfr:
+.PHONY: all-cloog maybe-all-cloog
+maybe-all-cloog:
 @if gcc-bootstrap
-all-mpfr: stage_current
+all-cloog: stage_current
 @endif gcc-bootstrap
-@if mpfr
-TARGET-mpfr=all
-maybe-all-mpfr: all-mpfr
-all-mpfr: configure-mpfr
+@if cloog
+TARGET-cloog=all
+maybe-all-cloog: all-cloog
+all-cloog: configure-cloog
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-               $(TARGET-mpfr))
-@endif mpfr
+               $(TARGET-cloog))
+@endif cloog
 
 
 
-.PHONY: all-stage1-mpfr maybe-all-stage1-mpfr
-.PHONY: clean-stage1-mpfr maybe-clean-stage1-mpfr
-maybe-all-stage1-mpfr:
-maybe-clean-stage1-mpfr:
-@if mpfr-bootstrap
-maybe-all-stage1-mpfr: all-stage1-mpfr
-all-stage1: all-stage1-mpfr
-TARGET-stage1-mpfr = $(TARGET-mpfr)
-all-stage1-mpfr: configure-stage1-mpfr
+.PHONY: all-stage1-cloog maybe-all-stage1-cloog
+.PHONY: clean-stage1-cloog maybe-clean-stage1-cloog
+maybe-all-stage1-cloog:
+maybe-clean-stage1-cloog:
+@if cloog-bootstrap
+maybe-all-stage1-cloog: all-stage1-cloog
+all-stage1: all-stage1-cloog
+TARGET-stage1-cloog = $(TARGET-cloog)
+all-stage1-cloog: configure-stage1-cloog
        @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
                LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
                CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
                CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS)   \
-               $(TARGET-stage1-mpfr)
+               $(TARGET-stage1-cloog)
 
-maybe-clean-stage1-mpfr: clean-stage1-mpfr
-clean-stage1: clean-stage1-mpfr
-clean-stage1-mpfr:
+maybe-clean-stage1-cloog: clean-stage1-cloog
+clean-stage1: clean-stage1-cloog
+clean-stage1-cloog:
        @if [ $(current_stage) = stage1 ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stage1-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stage1-cloog/Makefile ] || exit 0; \
          $(MAKE) stage1-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stage2-mpfr maybe-all-stage2-mpfr
-.PHONY: clean-stage2-mpfr maybe-clean-stage2-mpfr
-maybe-all-stage2-mpfr:
-maybe-clean-stage2-mpfr:
-@if mpfr-bootstrap
-maybe-all-stage2-mpfr: all-stage2-mpfr
-all-stage2: all-stage2-mpfr
-TARGET-stage2-mpfr = $(TARGET-mpfr)
-all-stage2-mpfr: configure-stage2-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stage2-cloog maybe-all-stage2-cloog
+.PHONY: clean-stage2-cloog maybe-clean-stage2-cloog
+maybe-all-stage2-cloog:
+maybe-clean-stage2-cloog:
+@if cloog-bootstrap
+maybe-all-stage2-cloog: all-stage2-cloog
+all-stage2: all-stage2-cloog
+TARGET-stage2-cloog = $(TARGET-cloog)
+all-stage2-cloog: configure-stage2-cloog
        @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
                LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
                CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
                CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stage2-mpfr)
+               $(TARGET-stage2-cloog)
 
-maybe-clean-stage2-mpfr: clean-stage2-mpfr
-clean-stage2: clean-stage2-mpfr
-clean-stage2-mpfr:
+maybe-clean-stage2-cloog: clean-stage2-cloog
+clean-stage2: clean-stage2-cloog
+clean-stage2-cloog:
        @if [ $(current_stage) = stage2 ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stage2-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stage2-cloog/Makefile ] || exit 0; \
          $(MAKE) stage2-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stageb2g0-mpfr maybe-all-stageb2g0-mpfr
-.PHONY: clean-stageb2g0-mpfr maybe-clean-stageb2g0-mpfr
-maybe-all-stageb2g0-mpfr:
-maybe-clean-stageb2g0-mpfr:
-@if mpfr-bootstrap
-maybe-all-stageb2g0-mpfr: all-stageb2g0-mpfr
-all-stageb2g0: all-stageb2g0-mpfr
-TARGET-stageb2g0-mpfr = $(TARGET-mpfr)
-all-stageb2g0-mpfr: configure-stageb2g0-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stageb2g0-cloog maybe-all-stageb2g0-cloog
+.PHONY: clean-stageb2g0-cloog maybe-clean-stageb2g0-cloog
+maybe-all-stageb2g0-cloog:
+maybe-clean-stageb2g0-cloog:
+@if cloog-bootstrap
+maybe-all-stageb2g0-cloog: all-stageb2g0-cloog
+all-stageb2g0: all-stageb2g0-cloog
+TARGET-stageb2g0-cloog = $(TARGET-cloog)
+all-stageb2g0-cloog: configure-stageb2g0-cloog
        @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
                LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
                CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
                CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stageb2g0-mpfr)
+               $(TARGET-stageb2g0-cloog)
 
-maybe-clean-stageb2g0-mpfr: clean-stageb2g0-mpfr
-clean-stageb2g0: clean-stageb2g0-mpfr
-clean-stageb2g0-mpfr:
+maybe-clean-stageb2g0-cloog: clean-stageb2g0-cloog
+clean-stageb2g0: clean-stageb2g0-cloog
+clean-stageb2g0-cloog:
        @if [ $(current_stage) = stageb2g0 ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stageb2g0-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stageb2g0-cloog/Makefile ] || exit 0; \
          $(MAKE) stageb2g0-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stage3-mpfr maybe-all-stage3-mpfr
-.PHONY: clean-stage3-mpfr maybe-clean-stage3-mpfr
-maybe-all-stage3-mpfr:
-maybe-clean-stage3-mpfr:
-@if mpfr-bootstrap
-maybe-all-stage3-mpfr: all-stage3-mpfr
-all-stage3: all-stage3-mpfr
-TARGET-stage3-mpfr = $(TARGET-mpfr)
-all-stage3-mpfr: configure-stage3-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stage3-cloog maybe-all-stage3-cloog
+.PHONY: clean-stage3-cloog maybe-clean-stage3-cloog
+maybe-all-stage3-cloog:
+maybe-clean-stage3-cloog:
+@if cloog-bootstrap
+maybe-all-stage3-cloog: all-stage3-cloog
+all-stage3: all-stage3-cloog
+TARGET-stage3-cloog = $(TARGET-cloog)
+all-stage3-cloog: configure-stage3-cloog
        @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
                LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
                CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
                CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stage3-mpfr)
+               $(TARGET-stage3-cloog)
 
-maybe-clean-stage3-mpfr: clean-stage3-mpfr
-clean-stage3: clean-stage3-mpfr
-clean-stage3-mpfr:
+maybe-clean-stage3-cloog: clean-stage3-cloog
+clean-stage3: clean-stage3-cloog
+clean-stage3-cloog:
        @if [ $(current_stage) = stage3 ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stage3-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stage3-cloog/Makefile ] || exit 0; \
          $(MAKE) stage3-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stageb3g2-mpfr maybe-all-stageb3g2-mpfr
-.PHONY: clean-stageb3g2-mpfr maybe-clean-stageb3g2-mpfr
-maybe-all-stageb3g2-mpfr:
-maybe-clean-stageb3g2-mpfr:
-@if mpfr-bootstrap
-maybe-all-stageb3g2-mpfr: all-stageb3g2-mpfr
-all-stageb3g2: all-stageb3g2-mpfr
-TARGET-stageb3g2-mpfr = $(TARGET-mpfr)
-all-stageb3g2-mpfr: configure-stageb3g2-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stageb3g2-cloog maybe-all-stageb3g2-cloog
+.PHONY: clean-stageb3g2-cloog maybe-clean-stageb3g2-cloog
+maybe-all-stageb3g2-cloog:
+maybe-clean-stageb3g2-cloog:
+@if cloog-bootstrap
+maybe-all-stageb3g2-cloog: all-stageb3g2-cloog
+all-stageb3g2: all-stageb3g2-cloog
+TARGET-stageb3g2-cloog = $(TARGET-cloog)
+all-stageb3g2-cloog: configure-stageb3g2-cloog
        @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
                LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
                CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
                CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stageb3g2-mpfr)
+               $(TARGET-stageb3g2-cloog)
 
-maybe-clean-stageb3g2-mpfr: clean-stageb3g2-mpfr
-clean-stageb3g2: clean-stageb3g2-mpfr
-clean-stageb3g2-mpfr:
+maybe-clean-stageb3g2-cloog: clean-stageb3g2-cloog
+clean-stageb3g2: clean-stageb3g2-cloog
+clean-stageb3g2-cloog:
        @if [ $(current_stage) = stageb3g2 ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stageb3g2-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stageb3g2-cloog/Makefile ] || exit 0; \
          $(MAKE) stageb3g2-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stage4-mpfr maybe-all-stage4-mpfr
-.PHONY: clean-stage4-mpfr maybe-clean-stage4-mpfr
-maybe-all-stage4-mpfr:
-maybe-clean-stage4-mpfr:
-@if mpfr-bootstrap
-maybe-all-stage4-mpfr: all-stage4-mpfr
-all-stage4: all-stage4-mpfr
-TARGET-stage4-mpfr = $(TARGET-mpfr)
-all-stage4-mpfr: configure-stage4-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stage4-cloog maybe-all-stage4-cloog
+.PHONY: clean-stage4-cloog maybe-clean-stage4-cloog
+maybe-all-stage4-cloog:
+maybe-clean-stage4-cloog:
+@if cloog-bootstrap
+maybe-all-stage4-cloog: all-stage4-cloog
+all-stage4: all-stage4-cloog
+TARGET-stage4-cloog = $(TARGET-cloog)
+all-stage4-cloog: configure-stage4-cloog
        @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
                LIBCFLAGS="$(STAGE4_CFLAGS)" \
                CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
                CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stage4-mpfr)
+               $(TARGET-stage4-cloog)
 
-maybe-clean-stage4-mpfr: clean-stage4-mpfr
-clean-stage4: clean-stage4-mpfr
-clean-stage4-mpfr:
+maybe-clean-stage4-cloog: clean-stage4-cloog
+clean-stage4: clean-stage4-cloog
+clean-stage4-cloog:
        @if [ $(current_stage) = stage4 ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stage4-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stage4-cloog/Makefile ] || exit 0; \
          $(MAKE) stage4-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stageprofile-mpfr maybe-all-stageprofile-mpfr
-.PHONY: clean-stageprofile-mpfr maybe-clean-stageprofile-mpfr
-maybe-all-stageprofile-mpfr:
-maybe-clean-stageprofile-mpfr:
-@if mpfr-bootstrap
-maybe-all-stageprofile-mpfr: all-stageprofile-mpfr
-all-stageprofile: all-stageprofile-mpfr
-TARGET-stageprofile-mpfr = $(TARGET-mpfr)
-all-stageprofile-mpfr: configure-stageprofile-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stageprofile-cloog maybe-all-stageprofile-cloog
+.PHONY: clean-stageprofile-cloog maybe-clean-stageprofile-cloog
+maybe-all-stageprofile-cloog:
+maybe-clean-stageprofile-cloog:
+@if cloog-bootstrap
+maybe-all-stageprofile-cloog: all-stageprofile-cloog
+all-stageprofile: all-stageprofile-cloog
+TARGET-stageprofile-cloog = $(TARGET-cloog)
+all-stageprofile-cloog: configure-stageprofile-cloog
        @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
                LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
                CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
                CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stageprofile-mpfr)
+               $(TARGET-stageprofile-cloog)
 
-maybe-clean-stageprofile-mpfr: clean-stageprofile-mpfr
-clean-stageprofile: clean-stageprofile-mpfr
-clean-stageprofile-mpfr:
+maybe-clean-stageprofile-cloog: clean-stageprofile-cloog
+clean-stageprofile: clean-stageprofile-cloog
+clean-stageprofile-cloog:
        @if [ $(current_stage) = stageprofile ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stageprofile-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stageprofile-cloog/Makefile ] || exit 0; \
          $(MAKE) stageprofile-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
-
-
-.PHONY: all-stagefeedback-mpfr maybe-all-stagefeedback-mpfr
-.PHONY: clean-stagefeedback-mpfr maybe-clean-stagefeedback-mpfr
-maybe-all-stagefeedback-mpfr:
-maybe-clean-stagefeedback-mpfr:
-@if mpfr-bootstrap
-maybe-all-stagefeedback-mpfr: all-stagefeedback-mpfr
-all-stagefeedback: all-stagefeedback-mpfr
-TARGET-stagefeedback-mpfr = $(TARGET-mpfr)
-all-stagefeedback-mpfr: configure-stagefeedback-mpfr
+@endif cloog-bootstrap
+
+
+.PHONY: all-stagefeedback-cloog maybe-all-stagefeedback-cloog
+.PHONY: clean-stagefeedback-cloog maybe-clean-stagefeedback-cloog
+maybe-all-stagefeedback-cloog:
+maybe-clean-stagefeedback-cloog:
+@if cloog-bootstrap
+maybe-all-stagefeedback-cloog: all-stagefeedback-cloog
+all-stagefeedback: all-stagefeedback-cloog
+TARGET-stagefeedback-cloog = $(TARGET-cloog)
+all-stagefeedback-cloog: configure-stagefeedback-cloog
        @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        $(POSTSTAGE1_HOST_EXPORTS) \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(BASE_FLAGS_TO_PASS) \
                CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
                LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
                CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
                CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               $(TARGET-stagefeedback-mpfr)
+               $(TARGET-stagefeedback-cloog)
 
-maybe-clean-stagefeedback-mpfr: clean-stagefeedback-mpfr
-clean-stagefeedback: clean-stagefeedback-mpfr
-clean-stagefeedback-mpfr:
+maybe-clean-stagefeedback-cloog: clean-stagefeedback-cloog
+clean-stagefeedback: clean-stagefeedback-cloog
+clean-stagefeedback-cloog:
        @if [ $(current_stage) = stagefeedback ]; then \
-         [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
        else \
-         [ -f $(HOST_SUBDIR)/stagefeedback-mpfr/Makefile ] || exit 0; \
+         [ -f $(HOST_SUBDIR)/stagefeedback-cloog/Makefile ] || exit 0; \
          $(MAKE) stagefeedback-start; \
        fi; \
-       cd $(HOST_SUBDIR)/mpfr && \
+       cd $(HOST_SUBDIR)/cloog && \
        $(MAKE) $(EXTRA_HOST_FLAGS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
                 clean
-@endif mpfr-bootstrap
+@endif cloog-bootstrap
 
 
 
 
 
-.PHONY: check-mpfr maybe-check-mpfr
-maybe-check-mpfr:
-@if mpfr
-maybe-check-mpfr: check-mpfr
+.PHONY: check-cloog maybe-check-cloog
+maybe-check-cloog:
+@if cloog
+maybe-check-cloog: check-cloog
 
-check-mpfr:
+check-cloog:
        @: $(MAKE); $(unstage)
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(FLAGS_TO_PASS)  check)
 
-@endif mpfr
+@endif cloog
 
-.PHONY: install-mpfr maybe-install-mpfr
-maybe-install-mpfr:
-@if mpfr
-maybe-install-mpfr: install-mpfr
+.PHONY: install-cloog maybe-install-cloog
+maybe-install-cloog:
+@if cloog
+maybe-install-cloog: install-cloog
 
-install-mpfr:
+install-cloog:
 
-@endif mpfr
+@endif cloog
 
 # Other targets (info, dvi, pdf, etc.)
 
-.PHONY: maybe-info-mpfr info-mpfr
-maybe-info-mpfr:
-@if mpfr
-maybe-info-mpfr: info-mpfr
+.PHONY: maybe-info-cloog info-cloog
+maybe-info-cloog:
+@if cloog
+maybe-info-cloog: info-cloog
 
-info-mpfr: \
-    configure-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+info-cloog: \
+    configure-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing info in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing info in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17617,24 +19593,24 @@ info-mpfr: \
                  info) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-dvi-mpfr dvi-mpfr
-maybe-dvi-mpfr:
-@if mpfr
-maybe-dvi-mpfr: dvi-mpfr
+.PHONY: maybe-dvi-cloog dvi-cloog
+maybe-dvi-cloog:
+@if cloog
+maybe-dvi-cloog: dvi-cloog
 
-dvi-mpfr: \
-    configure-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+dvi-cloog: \
+    configure-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing dvi in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing dvi in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17642,24 +19618,24 @@ dvi-mpfr: \
                  dvi) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-pdf-mpfr pdf-mpfr
-maybe-pdf-mpfr:
-@if mpfr
-maybe-pdf-mpfr: pdf-mpfr
+.PHONY: maybe-pdf-cloog pdf-cloog
+maybe-pdf-cloog:
+@if cloog
+maybe-pdf-cloog: pdf-cloog
 
-pdf-mpfr: \
-    configure-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+pdf-cloog: \
+    configure-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing pdf in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing pdf in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17667,24 +19643,24 @@ pdf-mpfr: \
                  pdf) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-html-mpfr html-mpfr
-maybe-html-mpfr:
-@if mpfr
-maybe-html-mpfr: html-mpfr
+.PHONY: maybe-html-cloog html-cloog
+maybe-html-cloog:
+@if cloog
+maybe-html-cloog: html-cloog
 
-html-mpfr: \
-    configure-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+html-cloog: \
+    configure-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing html in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing html in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17692,24 +19668,24 @@ html-mpfr: \
                  html) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-TAGS-mpfr TAGS-mpfr
-maybe-TAGS-mpfr:
-@if mpfr
-maybe-TAGS-mpfr: TAGS-mpfr
+.PHONY: maybe-TAGS-cloog TAGS-cloog
+maybe-TAGS-cloog:
+@if cloog
+maybe-TAGS-cloog: TAGS-cloog
 
-TAGS-mpfr: \
-    configure-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+TAGS-cloog: \
+    configure-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing TAGS in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing TAGS in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17717,25 +19693,25 @@ TAGS-mpfr: \
                  TAGS) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-install-info-mpfr install-info-mpfr
-maybe-install-info-mpfr:
-@if mpfr
-maybe-install-info-mpfr: install-info-mpfr
+.PHONY: maybe-install-info-cloog install-info-cloog
+maybe-install-info-cloog:
+@if cloog
+maybe-install-info-cloog: install-info-cloog
 
-install-info-mpfr: \
-    configure-mpfr \
-    info-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+install-info-cloog: \
+    configure-cloog \
+    info-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing install-info in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing install-info in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17743,25 +19719,25 @@ install-info-mpfr: \
                  install-info) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-install-pdf-mpfr install-pdf-mpfr
-maybe-install-pdf-mpfr:
-@if mpfr
-maybe-install-pdf-mpfr: install-pdf-mpfr
+.PHONY: maybe-install-pdf-cloog install-pdf-cloog
+maybe-install-pdf-cloog:
+@if cloog
+maybe-install-pdf-cloog: install-pdf-cloog
 
-install-pdf-mpfr: \
-    configure-mpfr \
-    pdf-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+install-pdf-cloog: \
+    configure-cloog \
+    pdf-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing install-pdf in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing install-pdf in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17769,25 +19745,25 @@ install-pdf-mpfr: \
                  install-pdf) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-install-html-mpfr install-html-mpfr
-maybe-install-html-mpfr:
-@if mpfr
-maybe-install-html-mpfr: install-html-mpfr
+.PHONY: maybe-install-html-cloog install-html-cloog
+maybe-install-html-cloog:
+@if cloog
+maybe-install-html-cloog: install-html-cloog
 
-install-html-mpfr: \
-    configure-mpfr \
-    html-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+install-html-cloog: \
+    configure-cloog \
+    html-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing install-html in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing install-html in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17795,24 +19771,24 @@ install-html-mpfr: \
                  install-html) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-installcheck-mpfr installcheck-mpfr
-maybe-installcheck-mpfr:
-@if mpfr
-maybe-installcheck-mpfr: installcheck-mpfr
+.PHONY: maybe-installcheck-cloog installcheck-cloog
+maybe-installcheck-cloog:
+@if cloog
+maybe-installcheck-cloog: installcheck-cloog
 
-installcheck-mpfr: \
-    configure-mpfr 
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+installcheck-cloog: \
+    configure-cloog 
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing installcheck in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing installcheck in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17820,23 +19796,23 @@ installcheck-mpfr: \
                  installcheck) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-mostlyclean-mpfr mostlyclean-mpfr
-maybe-mostlyclean-mpfr:
-@if mpfr
-maybe-mostlyclean-mpfr: mostlyclean-mpfr
+.PHONY: maybe-mostlyclean-cloog mostlyclean-cloog
+maybe-mostlyclean-cloog:
+@if cloog
+maybe-mostlyclean-cloog: mostlyclean-cloog
 
-mostlyclean-mpfr
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+mostlyclean-cloog
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing mostlyclean in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing mostlyclean in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17844,23 +19820,23 @@ mostlyclean-mpfr:
                  mostlyclean) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-clean-mpfr clean-mpfr
-maybe-clean-mpfr:
-@if mpfr
-maybe-clean-mpfr: clean-mpfr
+.PHONY: maybe-clean-cloog clean-cloog
+maybe-clean-cloog:
+@if cloog
+maybe-clean-cloog: clean-cloog
 
-clean-mpfr
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+clean-cloog
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing clean in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing clean in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17868,23 +19844,23 @@ clean-mpfr:
                  clean) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-distclean-mpfr distclean-mpfr
-maybe-distclean-mpfr:
-@if mpfr
-maybe-distclean-mpfr: distclean-mpfr
+.PHONY: maybe-distclean-cloog distclean-cloog
+maybe-distclean-cloog:
+@if cloog
+maybe-distclean-cloog: distclean-cloog
 
-distclean-mpfr
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+distclean-cloog
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing distclean in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing distclean in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17892,23 +19868,23 @@ distclean-mpfr:
                  distclean) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
-.PHONY: maybe-maintainer-clean-mpfr maintainer-clean-mpfr
-maybe-maintainer-clean-mpfr:
-@if mpfr
-maybe-maintainer-clean-mpfr: maintainer-clean-mpfr
+.PHONY: maybe-maintainer-clean-cloog maintainer-clean-cloog
+maybe-maintainer-clean-cloog:
+@if cloog
+maybe-maintainer-clean-cloog: maintainer-clean-cloog
 
-maintainer-clean-mpfr
-       @[ -f ./mpfr/Makefile ] || exit 0; \
+maintainer-clean-cloog
+       @[ -f ./cloog/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing maintainer-clean in mpfr" ; \
-       (cd $(HOST_SUBDIR)/mpfr && \
+       echo "Doing maintainer-clean in cloog" ; \
+       (cd $(HOST_SUBDIR)/cloog && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17916,7 +19892,7 @@ maintainer-clean-mpfr:
                  maintainer-clean) \
          || exit 1
 
-@endif mpfr
+@endif cloog
 
 
 
@@ -50688,6 +52664,16 @@ stage1-start::
          mkdir stage1-mpfr; \
        mv stage1-mpfr mpfr 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stage1-ppl ] || \
+         mkdir stage1-ppl; \
+       mv stage1-ppl ppl 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stage1-cloog ] || \
+         mkdir stage1-cloog; \
+       mv stage1-cloog cloog 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stage1-gold ] || \
          mkdir stage1-gold; \
@@ -50763,6 +52749,16 @@ stage1-end::
          cd $(HOST_SUBDIR); mv mpfr stage1-mpfr  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stage1-ppl  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stage1-cloog  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stage1-gold  ; \
@@ -50888,6 +52884,18 @@ stage2-start::
        mv stage2-mpfr mpfr  ; \
        mv stage1-mpfr prev-mpfr || test -f stage1-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stage2-ppl ] || \
+         mkdir stage2-ppl; \
+       mv stage2-ppl ppl  ; \
+       mv stage1-ppl prev-ppl || test -f stage1-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stage2-cloog ] || \
+         mkdir stage2-cloog; \
+       mv stage2-cloog cloog  ; \
+       mv stage1-cloog prev-cloog || test -f stage1-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stage2-gold ] || \
          mkdir stage2-gold; \
@@ -50978,6 +52986,18 @@ stage2-end::
          mv prev-mpfr stage1-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stage2-ppl ; \
+         mv prev-ppl stage1-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stage2-cloog ; \
+         mv prev-cloog stage1-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stage2-gold ; \
@@ -51132,6 +53152,18 @@ stageb2g0-start::
        mv stageb2g0-mpfr mpfr  ; \
        mv stage1-mpfr prev-mpfr || test -f stage1-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stageb2g0-ppl ] || \
+         mkdir stageb2g0-ppl; \
+       mv stageb2g0-ppl ppl  ; \
+       mv stage1-ppl prev-ppl || test -f stage1-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stageb2g0-cloog ] || \
+         mkdir stageb2g0-cloog; \
+       mv stageb2g0-cloog cloog  ; \
+       mv stage1-cloog prev-cloog || test -f stage1-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stageb2g0-gold ] || \
          mkdir stageb2g0-gold; \
@@ -51222,6 +53254,18 @@ stageb2g0-end::
          mv prev-mpfr stage1-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stageb2g0-ppl ; \
+         mv prev-ppl stage1-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stageb2g0-cloog ; \
+         mv prev-cloog stage1-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stageb2g0-gold ; \
@@ -51376,6 +53420,18 @@ stage3-start::
        mv stage3-mpfr mpfr  ; \
        mv stage2-mpfr prev-mpfr || test -f stage2-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stage3-ppl ] || \
+         mkdir stage3-ppl; \
+       mv stage3-ppl ppl  ; \
+       mv stage2-ppl prev-ppl || test -f stage2-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stage3-cloog ] || \
+         mkdir stage3-cloog; \
+       mv stage3-cloog cloog  ; \
+       mv stage2-cloog prev-cloog || test -f stage2-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stage3-gold ] || \
          mkdir stage3-gold; \
@@ -51466,6 +53522,18 @@ stage3-end::
          mv prev-mpfr stage2-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stage3-ppl ; \
+         mv prev-ppl stage2-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stage3-cloog ; \
+         mv prev-cloog stage2-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stage3-gold ; \
@@ -51674,6 +53742,18 @@ stageb3g2-start::
        mv stageb3g2-mpfr mpfr  ; \
        mv stageb2g0-mpfr prev-mpfr || test -f stageb2g0-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stageb3g2-ppl ] || \
+         mkdir stageb3g2-ppl; \
+       mv stageb3g2-ppl ppl  ; \
+       mv stageb2g0-ppl prev-ppl || test -f stageb2g0-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stageb3g2-cloog ] || \
+         mkdir stageb3g2-cloog; \
+       mv stageb3g2-cloog cloog  ; \
+       mv stageb2g0-cloog prev-cloog || test -f stageb2g0-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stageb3g2-gold ] || \
          mkdir stageb3g2-gold; \
@@ -51764,6 +53844,18 @@ stageb3g2-end::
          mv prev-mpfr stageb2g0-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stageb3g2-ppl ; \
+         mv prev-ppl stageb2g0-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stageb3g2-cloog ; \
+         mv prev-cloog stageb2g0-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stageb3g2-gold ; \
@@ -51972,6 +54064,18 @@ stage4-start::
        mv stage4-mpfr mpfr  ; \
        mv stage3-mpfr prev-mpfr || test -f stage3-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stage4-ppl ] || \
+         mkdir stage4-ppl; \
+       mv stage4-ppl ppl  ; \
+       mv stage3-ppl prev-ppl || test -f stage3-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stage4-cloog ] || \
+         mkdir stage4-cloog; \
+       mv stage4-cloog cloog  ; \
+       mv stage3-cloog prev-cloog || test -f stage3-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stage4-gold ] || \
          mkdir stage4-gold; \
@@ -52062,6 +54166,18 @@ stage4-end::
          mv prev-mpfr stage3-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stage4-ppl ; \
+         mv prev-ppl stage3-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stage4-cloog ; \
+         mv prev-cloog stage3-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stage4-gold ; \
@@ -52259,6 +54375,18 @@ stageprofile-start::
        mv stageprofile-mpfr mpfr  ; \
        mv stage1-mpfr prev-mpfr || test -f stage1-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stageprofile-ppl ] || \
+         mkdir stageprofile-ppl; \
+       mv stageprofile-ppl ppl  ; \
+       mv stage1-ppl prev-ppl || test -f stage1-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stageprofile-cloog ] || \
+         mkdir stageprofile-cloog; \
+       mv stageprofile-cloog cloog  ; \
+       mv stage1-cloog prev-cloog || test -f stage1-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stageprofile-gold ] || \
          mkdir stageprofile-gold; \
@@ -52349,6 +54477,18 @@ stageprofile-end::
          mv prev-mpfr stage1-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stageprofile-ppl ; \
+         mv prev-ppl stage1-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stageprofile-cloog ; \
+         mv prev-cloog stage1-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stageprofile-gold ; \
@@ -52482,6 +54622,18 @@ stagefeedback-start::
        mv stagefeedback-mpfr mpfr  ; \
        mv stageprofile-mpfr prev-mpfr || test -f stageprofile-lean 
 @endif mpfr
+@if ppl
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-ppl ] || \
+         mkdir stagefeedback-ppl; \
+       mv stagefeedback-ppl ppl  ; \
+       mv stageprofile-ppl prev-ppl || test -f stageprofile-lean 
+@endif ppl
+@if cloog
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-cloog ] || \
+         mkdir stagefeedback-cloog; \
+       mv stagefeedback-cloog cloog  ; \
+       mv stageprofile-cloog prev-cloog || test -f stageprofile-lean 
+@endif cloog
 @if gold
        @cd $(HOST_SUBDIR); [ -d stagefeedback-gold ] || \
          mkdir stagefeedback-gold; \
@@ -52572,6 +54724,18 @@ stagefeedback-end::
          mv prev-mpfr stageprofile-mpfr ; :  ; \
        fi
 @endif mpfr
+@if ppl
+       @if test -d $(HOST_SUBDIR)/ppl ; then \
+         cd $(HOST_SUBDIR); mv ppl stagefeedback-ppl ; \
+         mv prev-ppl stageprofile-ppl ; :  ; \
+       fi
+@endif ppl
+@if cloog
+       @if test -d $(HOST_SUBDIR)/cloog ; then \
+         cd $(HOST_SUBDIR); mv cloog stagefeedback-cloog ; \
+         mv prev-cloog stageprofile-cloog ; :  ; \
+       fi
+@endif cloog
 @if gold
        @if test -d $(HOST_SUBDIR)/gold ; then \
          cd $(HOST_SUBDIR); mv gold stagefeedback-gold ; \
@@ -52888,6 +55052,26 @@ all-stageb3g2-gcc: maybe-all-stageb3g2-mpfr
 all-stage4-gcc: maybe-all-stage4-mpfr
 all-stageprofile-gcc: maybe-all-stageprofile-mpfr
 all-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
+all-gcc: maybe-all-ppl
+
+all-stage1-gcc: maybe-all-stage1-ppl
+all-stage2-gcc: maybe-all-stage2-ppl
+all-stageb2g0-gcc: maybe-all-stageb2g0-ppl
+all-stage3-gcc: maybe-all-stage3-ppl
+all-stageb3g2-gcc: maybe-all-stageb3g2-ppl
+all-stage4-gcc: maybe-all-stage4-ppl
+all-stageprofile-gcc: maybe-all-stageprofile-ppl
+all-stagefeedback-gcc: maybe-all-stagefeedback-ppl
+all-gcc: maybe-all-cloog
+
+all-stage1-gcc: maybe-all-stage1-cloog
+all-stage2-gcc: maybe-all-stage2-cloog
+all-stageb2g0-gcc: maybe-all-stageb2g0-cloog
+all-stage3-gcc: maybe-all-stage3-cloog
+all-stageb3g2-gcc: maybe-all-stageb3g2-cloog
+all-stage4-gcc: maybe-all-stage4-cloog
+all-stageprofile-gcc: maybe-all-stageprofile-cloog
+all-stagefeedback-gcc: maybe-all-stagefeedback-cloog
 all-gcc: maybe-all-build-texinfo
 
 all-stage1-gcc: maybe-all-build-texinfo
@@ -53042,6 +55226,36 @@ configure-stageb3g2-mpfr: maybe-all-stageb3g2-gmp
 configure-stage4-mpfr: maybe-all-stage4-gmp
 configure-stageprofile-mpfr: maybe-all-stageprofile-gmp
 configure-stagefeedback-mpfr: maybe-all-stagefeedback-gmp
+configure-ppl: maybe-all-gmp
+
+configure-stage1-ppl: maybe-all-stage1-gmp
+configure-stage2-ppl: maybe-all-stage2-gmp
+configure-stageb2g0-ppl: maybe-all-stageb2g0-gmp
+configure-stage3-ppl: maybe-all-stage3-gmp
+configure-stageb3g2-ppl: maybe-all-stageb3g2-gmp
+configure-stage4-ppl: maybe-all-stage4-gmp
+configure-stageprofile-ppl: maybe-all-stageprofile-gmp
+configure-stagefeedback-ppl: maybe-all-stagefeedback-gmp
+configure-ppl: maybe-all-mpfr
+
+configure-stage1-ppl: maybe-all-stage1-mpfr
+configure-stage2-ppl: maybe-all-stage2-mpfr
+configure-stageb2g0-ppl: maybe-all-stageb2g0-mpfr
+configure-stage3-ppl: maybe-all-stage3-mpfr
+configure-stageb3g2-ppl: maybe-all-stageb3g2-mpfr
+configure-stage4-ppl: maybe-all-stage4-mpfr
+configure-stageprofile-ppl: maybe-all-stageprofile-mpfr
+configure-stagefeedback-ppl: maybe-all-stagefeedback-mpfr
+configure-cloog: maybe-all-ppl
+
+configure-stage1-cloog: maybe-all-stage1-ppl
+configure-stage2-cloog: maybe-all-stage2-ppl
+configure-stageb2g0-cloog: maybe-all-stageb2g0-ppl
+configure-stage3-cloog: maybe-all-stage3-ppl
+configure-stageb3g2-cloog: maybe-all-stageb3g2-ppl
+configure-stage4-cloog: maybe-all-stage4-ppl
+configure-stageprofile-cloog: maybe-all-stageprofile-ppl
+configure-stagefeedback-cloog: maybe-all-stagefeedback-ppl
 configure-gdb: maybe-all-intl
 configure-gdb: maybe-configure-sim
 configure-gdb: maybe-all-bfd
index 051703e..f654fb3 100644 (file)
@@ -199,6 +199,10 @@ HOST_EXPORTS = \
        TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
        GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
        GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+       PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \
+       PPLINC="$(HOST_PPLINC)"; export PPLINC; \
+       CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
+       CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
 @if gcc-bootstrap
        $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
 @endif gcc-bootstrap
@@ -258,6 +262,14 @@ NORMAL_TARGET_EXPORTS = \
 HOST_GMPLIBS = @gmplibs@
 HOST_GMPINC = @gmpinc@
 
+# Where to find PPL
+HOST_PPLLIBS = @ppllibs@
+HOST_PPLINC = @pplinc@
+
+# Where to find CLOOG
+HOST_CLOOGLIBS = @clooglibs@
+HOST_CLOOGINC = @clooginc@
+
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------
index 1a2bbbc..52718c2 100755 (executable)
--- a/configure
+++ b/configure
@@ -272,7 +272,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 
 ac_unique_file="move-if-change"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TOPLEVEL_CONFIGURE_ARGUMENTS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TOPLEVEL_CONFIGURE_ARGUMENTS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc ppllibs pplinc clooglibs clooginc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
 ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
 ac_pwd=`pwd`
 
@@ -967,6 +967,16 @@ Optional Packages:
                           plus --with-gmp-lib=PATH/lib
   --with-gmp-include=PATH specify directory for installed GMP include files
   --with-gmp-lib=PATH     specify directory for the installed GMP library
+  --with-ppl=PATH         Specify prefix directory for the installed PPL package
+                          Equivalent to --with-ppl-include=PATH/include
+                          plus --with-ppl-lib=PATH/lib
+  --with-ppl-include=PATH Specify directory for installed PPL include files
+  --with-ppl-lib=PATH     Specify the directory for the installed PPL library
+  --with-cloog=PATH         Specify prefix directory for the installed CLOOG package
+                          Equivalent to --with-cloog-include=PATH/include
+                          plus --with-cloog-lib=PATH/lib
+  --with-cloog-include=PATH Specify directory for installed CLOOG include files
+  --with-cloog-lib=PATH     Specify the directory for the installed CLOOG library
   --with-build-sysroot=SYSROOT
                           use sysroot as the system root during the build
   --with-debug-prefix-map='A=B C=D ...'
@@ -1873,7 +1883,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
 
 # these libraries are used by various programs built for the host environment
 #
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -4791,6 +4801,217 @@ fi
 
 
 
+
+# Check for PPL
+ppl_major_version=0
+ppl_minor_version=10
+ppllibs=
+pplinc=
+
+
+# Check whether --with-ppl or --without-ppl was given.
+if test "${with_ppl+set}" = set; then
+  withval="$with_ppl"
+
+fi;
+
+# Check whether --with-ppl_include or --without-ppl_include was given.
+if test "${with_ppl_include+set}" = set; then
+  withval="$with_ppl_include"
+
+fi;
+
+# Check whether --with-ppl_lib or --without-ppl_lib was given.
+if test "${with_ppl_lib+set}" = set; then
+  withval="$with_ppl_lib"
+
+fi;
+
+if test "x$with_ppl" != x; then
+  ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
+  pplinc="-I$with_ppl/include $pplinc"
+  LIBS="$ppllibs $LIBS"
+fi
+if test "x$with_ppl_include" != x; then
+  pplinc="-I$with_ppl_include $pplinc"
+fi
+if test "x$with_ppl_lib" != x; then
+  ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
+  LIBS="$ppllibs $LIBS"
+fi
+if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
+  ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
+  pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
+  LIBS="$ppllibs $LIBS"
+fi
+
+# Flags needed for PPL
+
+
+
+
+# Check for CLOOG
+clooglibs=
+clooginc=
+
+
+# Check whether --with-cloog or --without-cloog was given.
+if test "${with_cloog+set}" = set; then
+  withval="$with_cloog"
+
+fi;
+
+# Check whether --with-cloog_include or --without-cloog_include was given.
+if test "${with_cloog_include+set}" = set; then
+  withval="$with_cloog_include"
+
+fi;
+
+# Check whether --with-cloog_lib or --without-cloog_lib was given.
+if test "${with_cloog_lib+set}" = set; then
+  withval="$with_cloog_lib"
+
+fi;
+
+if test "x$with_cloog" != x; then
+  clooglibs="-L$with_cloog/lib -lcloog"
+  clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
+  LIBS="$clooglibs $LIBS"
+fi
+if test "x$with_cloog_include" != x; then
+  clooginc="-I$with_cloog_include -DCLOOG_PPL_BACKEND "
+fi
+if test "x$with_cloog_lib" != x; then
+  clooglibs="-L$with_cloog_lib -lcloog"
+  LIBS="$clooglibs $LIBS"
+fi
+if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then
+  clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog '
+  clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND '
+  LIBS="$clooglibs $LIBS"
+fi
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $pplinc $gmpinc"
+
+echo "$as_me:$LINENO: checking for version $ppl_major_version.$ppl_minor_version of PPL" >&5
+echo $ECHO_N "checking for version $ppl_major_version.$ppl_minor_version of PPL... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "ppl_c.h"
+int
+main ()
+{
+
+#if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
+choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; clooglibs= ; clooginc=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$saved_CFLAGS"
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
+
+echo "$as_me:$LINENO: checking for correct version of CLooG" >&5
+echo $ECHO_N "checking for correct version of CLooG... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "cloog/cloog.h"
+int
+main ()
+{
+
+#if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
+choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; clooglibs= ; clooginc=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$saved_CFLAGS"
+
+# Flags needed for CLOOG
+
+
+
+
 # By default, C is the only stage 1 language.
 stage1_languages=,c,
 
@@ -12977,6 +13198,10 @@ s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
 s,@do_compare@,$do_compare,;t t
 s,@gmplibs@,$gmplibs,;t t
 s,@gmpinc@,$gmpinc,;t t
+s,@ppllibs@,$ppllibs,;t t
+s,@pplinc@,$pplinc,;t t
+s,@clooglibs@,$clooglibs,;t t
+s,@clooginc@,$clooginc,;t t
 s,@stage1_languages@,$stage1_languages,;t t
 s,@SYSROOT_CFLAGS_FOR_TARGET@,$SYSROOT_CFLAGS_FOR_TARGET,;t t
 s,@DEBUG_PREFIX_CFLAGS_FOR_TARGET@,$DEBUG_PREFIX_CFLAGS_FOR_TARGET,;t t
index e9309a6..1e6e374 100644 (file)
@@ -158,7 +158,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
 
 # these libraries are used by various programs built for the host environment
 #
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -1310,6 +1310,97 @@ fi
 AC_SUBST(gmplibs)
 AC_SUBST(gmpinc)
 
+
+# Check for PPL
+ppl_major_version=0
+ppl_minor_version=10
+ppllibs=
+pplinc=
+
+AC_ARG_WITH(ppl, [  --with-ppl=PATH         Specify prefix directory for the installed PPL package
+                          Equivalent to --with-ppl-include=PATH/include
+                          plus --with-ppl-lib=PATH/lib])
+AC_ARG_WITH(ppl_include, [  --with-ppl-include=PATH Specify directory for installed PPL include files])
+AC_ARG_WITH(ppl_lib, [  --with-ppl-lib=PATH     Specify the directory for the installed PPL library])
+
+if test "x$with_ppl" != x; then
+  ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
+  pplinc="-I$with_ppl/include $pplinc"
+  LIBS="$ppllibs $LIBS"
+fi
+if test "x$with_ppl_include" != x; then
+  pplinc="-I$with_ppl_include $pplinc"
+fi
+if test "x$with_ppl_lib" != x; then
+  ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
+  LIBS="$ppllibs $LIBS"
+fi
+if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
+  ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
+  pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
+  LIBS="$ppllibs $LIBS"
+fi
+
+# Flags needed for PPL
+AC_SUBST(ppllibs)
+AC_SUBST(pplinc)
+
+
+# Check for CLOOG
+clooglibs=
+clooginc=
+
+AC_ARG_WITH(cloog, [  --with-cloog=PATH         Specify prefix directory for the installed CLOOG package
+                          Equivalent to --with-cloog-include=PATH/include
+                          plus --with-cloog-lib=PATH/lib])
+AC_ARG_WITH(cloog_include, [  --with-cloog-include=PATH Specify directory for installed CLOOG include files])
+AC_ARG_WITH(cloog_lib, [  --with-cloog-lib=PATH     Specify the directory for the installed CLOOG library])
+
+if test "x$with_cloog" != x; then
+  clooglibs="-L$with_cloog/lib -lcloog"
+  clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
+  LIBS="$clooglibs $LIBS"
+fi
+if test "x$with_cloog_include" != x; then
+  clooginc="-I$with_cloog_include -DCLOOG_PPL_BACKEND "
+fi
+if test "x$with_cloog_lib" != x; then
+  clooglibs="-L$with_cloog_lib -lcloog"
+  LIBS="$clooglibs $LIBS"
+fi
+if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then
+  clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog '
+  clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND '
+  LIBS="$clooglibs $LIBS"
+fi
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $pplinc $gmpinc"
+
+AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
+AC_TRY_COMPILE([#include "ppl_c.h"],[
+#if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
+choke me
+#endif
+], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
+CFLAGS="$saved_CFLAGS"
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
+
+AC_MSG_CHECKING([for correct version of CLooG])
+AC_TRY_COMPILE([#include "cloog/cloog.h"],[
+#if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
+choke me
+#endif
+], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
+CFLAGS="$saved_CFLAGS"
+
+# Flags needed for CLOOG
+AC_SUBST(clooglibs)
+AC_SUBST(clooginc)
+
+
 # By default, C is the only stage 1 language.
 stage1_languages=,c,
 
index f5ee1e3..4a4bfc2 100644 (file)
@@ -183,6 +183,8 @@ dfp.o-warn = -Wno-error
 bitmap.o-warn = -Wno-error
 # dominance.c contains a -Wc++compat warning.
 dominance.o-warn = -Wno-error
+# graphite.c contains code calling cloog that has problems.
+graphite.o-warn = -Wno-error
 
 # All warnings have to be shut off in stage1 if the compiler used then
 # isn't gcc; configure determines that.  WARN_CFLAGS will be either
@@ -281,6 +283,14 @@ ZLIBINC = @zlibinc@
 GMPLIBS = @GMPLIBS@
 GMPINC = @GMPINC@
 
+# How to find PPL
+PPLLIBS = @PPLLIBS@
+PPLINC = @PPLINC@
+
+# How to find CLOOG
+CLOOGLIBS = @CLOOGLIBS@
+CLOOGINC = @CLOOGINC@
+
 CPPLIB = ../libcpp/libcpp.a
 CPPINC = -I$(srcdir)/../libcpp/include
 
@@ -891,7 +901,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
 
 # How to link with both our special library facilities
 # and the system's installed libraries.
-LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER)
+LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
+       $(GMPLIBS) $(CLOOGLIBS) $(PPLLIBS)
 
 # Any system libraries needed just for GNAT.
 SYSLIBS = @GNAT_LIBEXC@
@@ -920,7 +931,8 @@ BUILD_ERRORS = build/errors.o
 # libintl.h will be found in ../intl if we are using the included libintl.
 INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
           -I$(srcdir)/../include @INCINTL@ \
-          $(CPPINC) $(GMPINC) $(DECNUMINC)
+          $(CPPINC) $(GMPINC) $(DECNUMINC) \
+          $(PPLINC) $(CLOOGINC)
 
 .c.o:
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
@@ -1094,6 +1106,7 @@ OBJS-common = \
        global.o \
        graph.o \
        graphds.o \
+       graphite.o \
        gtype-desc.o \
        haifa-sched.o \
        hooks.o \
@@ -2340,6 +2353,10 @@ tree-data-ref.o: tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
    $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
    $(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h langhooks.h
+graphite.o: graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+   $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TOPLEV_H) \
+   $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) domwalk.h \
+   $(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h graphite.h pointer-set.h
 tree-vect-analyze.o: tree-vect-analyze.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RECOG_H) $(BASIC_BLOCK_H) \
    $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
index 0e95323..f6fe623 100644 (file)
@@ -1620,3 +1620,18 @@ single_exit (const struct loop *loop)
   else
     return NULL;
 }
+
+/* Returns true when BB has an edge exiting LOOP.  */
+
+bool
+is_loop_exit (struct loop *loop, basic_block bb)
+{
+  edge e;
+  edge_iterator ei;
+
+  FOR_EACH_EDGE (e, ei, bb->preds)
+    if (loop_exit_edge_p (loop, e))
+      return true;
+
+  return false;
+}
index aa3e611..37bf993 100644 (file)
@@ -228,6 +228,7 @@ extern int num_loop_insns (const struct loop *);
 extern int average_num_loop_insns (const struct loop *);
 extern unsigned get_loop_level (const struct loop *);
 extern bool loop_exit_edge_p (const struct loop *, const_edge);
+extern bool is_loop_exit (struct loop *, basic_block);
 extern void mark_loop_exit_edges (void);
 
 /* Loops & cfg manipulation.  */
@@ -284,6 +285,9 @@ extern bool can_duplicate_loop_p (const struct loop *loop);
 #define DLTHE_FLAG_COMPLETTE_PEEL 4    /* Update frequencies expecting
                                           a complete peeling.  */
 
+extern edge create_empty_if_region_on_edge (edge, tree);
+extern struct loop *create_empty_loop_on_edge (edge, tree, tree, tree, tree,
+                                              tree *, struct loop *);
 extern struct loop * duplicate_loop (struct loop *, struct loop *);
 extern bool duplicate_loop_to_header_edge (struct loop *, edge, 
                                           unsigned, sbitmap, edge,
index 025b5be..d8979b4 100644 (file)
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfglayout.h"
 #include "cfghooks.h"
 #include "output.h"
+#include "tree-flow.h"
 
 static void duplicate_subloops (struct loop *, struct loop *);
 static void copy_loops_to (struct loop **, int,
@@ -466,6 +467,243 @@ scale_loop_frequencies (struct loop *loop, int num, int den)
   free (bbs);
 }
 
+/* Recompute dominance information for basic blocks outside LOOP.  */
+
+static void
+update_dominators_in_loop (struct loop *loop)
+{
+  VEC (basic_block, heap) *dom_bbs = NULL;
+  sbitmap seen;
+  basic_block *body;
+  unsigned i;
+
+  seen = sbitmap_alloc (last_basic_block);
+  sbitmap_zero (seen);
+  body = get_loop_body (loop);
+
+  for (i = 0; i < loop->num_nodes; i++)
+    SET_BIT (seen, body[i]->index);
+
+  for (i = 0; i < loop->num_nodes; i++)
+    {
+      basic_block ldom;
+
+      for (ldom = first_dom_son (CDI_DOMINATORS, body[i]);
+          ldom;
+          ldom = next_dom_son (CDI_DOMINATORS, ldom))
+       if (!TEST_BIT (seen, ldom->index))
+         {
+           SET_BIT (seen, ldom->index);
+           VEC_safe_push (basic_block, heap, dom_bbs, ldom);
+         }
+    }
+
+  iterate_fix_dominators (CDI_DOMINATORS, dom_bbs, false);
+  free (body);
+  free (seen);
+  VEC_free (basic_block, heap, dom_bbs);
+}
+
+/* Creates an if region as shown above. CONDITION is used to create
+   the test for the if. 
+
+   |
+   |     -------------                 -------------
+   |     |  pred_bb  |                 |  pred_bb  |
+   |     -------------                 -------------
+   |           |                             |
+   |           |                             | ENTRY_EDGE
+   |           | ENTRY_EDGE                  V
+   |           |             ====>     -------------
+   |           |                       |  cond_bb  |
+   |           |                       | CONDITION |
+   |           |                       -------------
+   |           V                        /         \
+   |     -------------         e_false /           \ e_true
+   |     |  succ_bb  |                V             V
+   |     -------------         -----------       -----------
+   |                           | false_bb |      | true_bb |
+   |                           -----------       -----------
+   |                                   \           /
+   |                                    \         /
+   |                                     V       V
+   |                                   -------------
+   |                                   |  join_bb  |
+   |                                   -------------
+   |                                         | exit_edge (result)
+   |                                         V
+   |                                    -----------
+   |                                    | succ_bb |
+   |                                    -----------
+   |
+ */
+
+edge
+create_empty_if_region_on_edge (edge entry_edge, tree condition)
+{
+
+  basic_block succ_bb, cond_bb, true_bb, false_bb, join_bb;
+  edge e_true, e_false, exit_edge;
+  gimple cond_stmt;
+  tree simple_cond;
+  gimple_stmt_iterator gsi;
+
+  succ_bb = entry_edge->dest;
+  cond_bb = split_edge (entry_edge);
+  
+  /* Insert condition in cond_bb.  */
+  gsi = gsi_last_bb (cond_bb);
+  simple_cond =
+    force_gimple_operand_gsi (&gsi, condition, true, NULL,
+                             false, GSI_NEW_STMT);
+  cond_stmt = gimple_build_cond_from_tree (simple_cond, NULL_TREE, NULL_TREE);
+  gsi = gsi_last_bb (cond_bb);
+  gsi_insert_after (&gsi, cond_stmt, GSI_NEW_STMT);
+  
+  join_bb = split_edge (single_succ_edge (cond_bb));
+
+  e_true = single_succ_edge (cond_bb);
+  true_bb = split_edge (e_true);
+
+  e_false = make_edge (cond_bb, join_bb, 0);
+  false_bb = split_edge (e_false);
+
+  e_true->flags &= ~EDGE_FALLTHRU;
+  e_true->flags |= EDGE_TRUE_VALUE;
+  e_false->flags &= ~EDGE_FALLTHRU;
+  e_false->flags |= EDGE_FALSE_VALUE;
+
+  set_immediate_dominator (CDI_DOMINATORS, cond_bb, entry_edge->src);
+  set_immediate_dominator (CDI_DOMINATORS, true_bb, cond_bb);
+  set_immediate_dominator (CDI_DOMINATORS, false_bb, cond_bb);
+  set_immediate_dominator (CDI_DOMINATORS, join_bb, cond_bb);
+
+  exit_edge = single_succ_edge (join_bb);
+
+  if (single_pred_p (exit_edge->dest))
+    set_immediate_dominator (CDI_DOMINATORS, exit_edge->dest, join_bb);
+
+  return exit_edge;
+}
+
+/* create_empty_loop_on_edge
+   |
+   |     -------------                 ------------------------
+   |     |  pred_bb  |                 |  pred_bb              |
+   |     -------------                 |  IV_0 = INITIAL_VALUE |
+   |           |                       ------------------------
+   |           |                       ______    | ENTRY_EDGE
+   |           | ENTRY_EDGE           /      V   V
+   |           |             ====>   |     -----------------------------
+   |           |                     |     | IV_BEFORE = phi (IV_0, IV) |
+   |           |                     |     | loop_header                |
+   |           V                     |     | IV_BEFORE <= UPPER_BOUND   |
+   |     -------------               |     -----------------------\-----
+   |     |  succ_bb  |               |         |                   \
+   |     -------------               |         |                    \ exit_e
+   |                                 |         V                     V---------
+   |                                 |      --------------           | succ_bb |
+   |                                 |      | loop_latch  |          ----------
+   |                                 |      |IV = IV_BEFORE + STRIDE
+   |                                 |      --------------
+   |                                  \       /
+   |                                   \ ___ /
+
+   Creates an empty loop as shown above, the IV_BEFORE is the SSA_NAME
+   that is used before the increment of IV. IV_BEFORE should be used for 
+   adding code to the body that uses the IV.  OUTER is the outer loop in
+   which the new loop should be inserted.  */
+
+struct loop *
+create_empty_loop_on_edge (edge entry_edge, 
+                          tree initial_value,
+                          tree stride, tree upper_bound,
+                          tree iv,
+                          tree *iv_before,
+                          struct loop *outer)
+{
+  basic_block loop_header, loop_latch, succ_bb, pred_bb;
+  struct loop *loop;
+  int freq;
+  gcov_type cnt;
+  gimple_stmt_iterator gsi;
+  bool insert_after;
+  gimple_seq stmts;
+  gimple cond_expr;
+  tree exit_test;
+  edge exit_e;
+  int prob;
+  tree upper_bound_gimplified;
+  
+  gcc_assert (entry_edge && initial_value && stride && upper_bound && iv);
+
+  /* Create header, latch and wire up the loop.  */
+  pred_bb = entry_edge->src;
+  loop_header = split_edge (entry_edge);
+  loop_latch = split_edge (single_succ_edge (loop_header));
+  succ_bb = single_succ (loop_latch);
+  make_edge (loop_header, succ_bb, 0);
+  redirect_edge_succ_nodup (single_succ_edge (loop_latch), loop_header);
+
+  /* Set immediate dominator information.  */
+  set_immediate_dominator (CDI_DOMINATORS, loop_header, pred_bb);
+  set_immediate_dominator (CDI_DOMINATORS, loop_latch, loop_header);
+  set_immediate_dominator (CDI_DOMINATORS, succ_bb, loop_header);
+
+  /* Initialize a loop structure and put it in a loop hierarchy.  */
+  loop = alloc_loop ();
+  loop->header = loop_header;
+  loop->latch = loop_latch;
+  add_loop (loop, outer);
+
+  /* TODO: Fix frequencies and counts.  */
+  freq = EDGE_FREQUENCY (entry_edge);
+  cnt = entry_edge->count;
+
+  prob = REG_BR_PROB_BASE / 2;
+
+  scale_loop_frequencies (loop, REG_BR_PROB_BASE - prob, REG_BR_PROB_BASE);
+
+  /* Update dominators.  */
+  update_dominators_in_loop (loop);
+
+  /* Construct IV code in loop.  */
+  initial_value = force_gimple_operand (initial_value, &stmts, true, iv);
+  if (stmts)
+    {
+      gsi_insert_seq_on_edge (loop_preheader_edge (loop), stmts);
+      gsi_commit_edge_inserts ();
+    }
+
+  standard_iv_increment_position (loop, &gsi, &insert_after);
+  create_iv (initial_value, stride, iv, loop, &gsi, insert_after,
+            iv_before, NULL);
+
+  /* Modify edge flags.  */
+  exit_e = single_exit (loop);
+  exit_e->flags = EDGE_LOOP_EXIT | EDGE_FALSE_VALUE;
+  single_pred_edge (loop_latch)->flags = EDGE_TRUE_VALUE;
+
+  gsi = gsi_last_bb (exit_e->src);
+
+  upper_bound_gimplified = 
+    force_gimple_operand_gsi (&gsi, upper_bound, true, NULL,
+                             false, GSI_NEW_STMT);
+  gsi = gsi_last_bb (exit_e->src);
+  
+  cond_expr = gimple_build_cond 
+    (LE_EXPR, *iv_before, upper_bound_gimplified, NULL_TREE, NULL_TREE);
+
+  exit_test = gimple_cond_lhs (cond_expr);
+  exit_test = force_gimple_operand_gsi (&gsi, exit_test, true, NULL,
+                                       false, GSI_NEW_STMT);
+  gimple_cond_set_lhs (cond_expr, exit_test);
+  gsi = gsi_last_bb (exit_e->src);
+  gsi_insert_after (&gsi, cond_expr, GSI_NEW_STMT);
+
+  return loop;
+}
+
 /* Make area between HEADER_EDGE and LATCH_EDGE a loop by connecting
    latch to header and update loop tree and dominators
    accordingly. Everything between them plus LATCH_EDGE destination must
@@ -483,10 +721,6 @@ loopify (edge latch_edge, edge header_edge,
 {
   basic_block succ_bb = latch_edge->dest;
   basic_block pred_bb = header_edge->src;
-  basic_block *body;
-  VEC (basic_block, heap) *dom_bbs;
-  unsigned i;
-  sbitmap seen;
   struct loop *loop = alloc_loop ();
   struct loop *outer = loop_outer (succ_bb->loop_father);
   int freq;
@@ -538,35 +772,7 @@ loopify (edge latch_edge, edge header_edge,
     }
   scale_loop_frequencies (loop, false_scale, REG_BR_PROB_BASE);
   scale_loop_frequencies (succ_bb->loop_father, true_scale, REG_BR_PROB_BASE);
-
-  /* Update dominators of blocks outside of LOOP.  */
-  dom_bbs = NULL;
-  seen = sbitmap_alloc (last_basic_block);
-  sbitmap_zero (seen);
-  body = get_loop_body (loop);
-
-  for (i = 0; i < loop->num_nodes; i++)
-    SET_BIT (seen, body[i]->index);
-
-  for (i = 0; i < loop->num_nodes; i++)
-    {
-      basic_block ldom;
-
-      for (ldom = first_dom_son (CDI_DOMINATORS, body[i]);
-          ldom;
-          ldom = next_dom_son (CDI_DOMINATORS, ldom))
-       if (!TEST_BIT (seen, ldom->index))
-         {
-           SET_BIT (seen, ldom->index);
-           VEC_safe_push (basic_block, heap, dom_bbs, ldom);
-         }
-    }
-
-  iterate_fix_dominators (CDI_DOMINATORS, dom_bbs, false);
-
-  free (body);
-  free (seen);
-  VEC_free (basic_block, heap, dom_bbs);
+  update_dominators_in_loop (loop);
 
   return loop;
 }
index 87824f5..e7f8159 100644 (file)
@@ -547,6 +547,22 @@ Common Report Var(flag_gcse_after_reload) Optimization
 Perform global common subexpression elimination after register allocation
 has finished
 
+fgraphite
+Common Report Var(flag_graphite)
+Enable in and out of Graphite representation
+
+floop-strip-mine
+Common Report Var(flag_loop_strip_mine) Optimization
+Enable Loop Strip Mining transformation
+
+floop-interchange
+Common Report Var(flag_loop_interchange) Optimization
+Enable Loop Interchange transformation
+
+floop-block
+Common Report Var(flag_loop_block) Optimization
+Enable Loop Blocking transformation
+
 fguess-branch-probability
 Common Report Var(flag_guess_branch_prob) Optimization
 Enable guessing of branch probabilities
index f4604d2..17bdeb4 100644 (file)
 #endif
 
 
+/* Define if cloog is in use. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_cloog
+#endif
+
+
 /* Define as const if the declaration of iconv() needs const. */
 #ifndef USED_FOR_TARGET
 #undef ICONV_CONST
index 6605def..aff51d6 100755 (executable)
@@ -458,7 +458,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC GRAPHITE LIBOBJS LTLIBOBJS'
 ac_subst_files='language_hooks'
 ac_pwd=`pwd`
 
@@ -928,6 +928,22 @@ ac_env_GMPINC_set=${GMPINC+set}
 ac_env_GMPINC_value=$GMPINC
 ac_cv_env_GMPINC_set=${GMPINC+set}
 ac_cv_env_GMPINC_value=$GMPINC
+ac_env_PPLLIBS_set=${PPLLIBS+set}
+ac_env_PPLLIBS_value=$PPLLIBS
+ac_cv_env_PPLLIBS_set=${PPLLIBS+set}
+ac_cv_env_PPLLIBS_value=$PPLLIBS
+ac_env_PPLINC_set=${PPLINC+set}
+ac_env_PPLINC_value=$PPLINC
+ac_cv_env_PPLINC_set=${PPLINC+set}
+ac_cv_env_PPLINC_value=$PPLINC
+ac_env_CLOOGLIBS_set=${CLOOGLIBS+set}
+ac_env_CLOOGLIBS_value=$CLOOGLIBS
+ac_cv_env_CLOOGLIBS_set=${CLOOGLIBS+set}
+ac_cv_env_CLOOGLIBS_value=$CLOOGLIBS
+ac_env_CLOOGINC_set=${CLOOGINC+set}
+ac_env_CLOOGINC_value=$CLOOGINC
+ac_cv_env_CLOOGINC_set=${CLOOGINC+set}
+ac_cv_env_CLOOGINC_value=$CLOOGINC
 
 #
 # Report the --help message.
@@ -1117,6 +1133,10 @@ Some influential environment variables:
   CPP         C preprocessor
   GMPLIBS     How to link GMP
   GMPINC      How to find GMP include files
+  PPLLIBS     How to link PPL
+  PPLINC      How to find PPL include files
+  CLOOGLIBS   How to link CLOOG
+  CLOOGINC    How to find CLOOG include files
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -14721,13 +14741,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:14724: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:14744: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:14727: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:14747: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:14730: output\"" >&5)
+  (eval echo "\"\$as_me:14750: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -15782,7 +15802,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 15785 "configure"' > conftest.$ac_ext
+  echo '#line 15805 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -16402,11 +16422,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16405: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16425: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16409: \$? = $ac_status" >&5
+   echo "$as_me:16429: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16724,11 +16744,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16727: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16747: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16731: \$? = $ac_status" >&5
+   echo "$as_me:16751: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16829,11 +16849,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16832: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16852: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16836: \$? = $ac_status" >&5
+   echo "$as_me:16856: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16884,11 +16904,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16887: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16907: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16891: \$? = $ac_status" >&5
+   echo "$as_me:16911: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19681,7 +19701,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19684 "configure"
+#line 19704 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19781,7 +19801,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19784 "configure"
+#line 19804 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
+
+
+
+
+
+if test "x${CLOOGLIBS}" != "x" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_cloog 1
+_ACEOF
+
+   GRAPHITE=graphite.o
+fi
+
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)
 
@@ -24825,6 +24860,11 @@ s,@fortran_target_objs@,$fortran_target_objs,;t t
 s,@target_cpu_default@,$target_cpu_default,;t t
 s,@GMPLIBS@,$GMPLIBS,;t t
 s,@GMPINC@,$GMPINC,;t t
+s,@PPLLIBS@,$PPLLIBS,;t t
+s,@PPLINC@,$PPLINC,;t t
+s,@CLOOGLIBS@,$CLOOGLIBS,;t t
+s,@CLOOGINC@,$CLOOGINC,;t t
+s,@GRAPHITE@,$GRAPHITE,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 /@language_hooks@/r $language_hooks
index a42ac5c..f4cff3d 100644 (file)
@@ -3883,6 +3883,15 @@ fi
 AC_ARG_VAR(GMPLIBS,[How to link GMP])
 AC_ARG_VAR(GMPINC,[How to find GMP include files])
 
+AC_ARG_VAR(PPLLIBS,[How to link PPL])
+AC_ARG_VAR(PPLINC,[How to find PPL include files])
+
+AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG])
+AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
+if test "x${CLOOGLIBS}" != "x" ; then 
+   AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
+fi
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)
 
index aa73f82..5768f08 100644 (file)
@@ -338,6 +338,7 @@ Objective-C and Objective-C++ Dialects}.
 -fira-coalesce -fno-ira-share-save-slots @gol
 -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
 -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
+-floop-block -floop-interchange -floop-strip-mine @gol
 -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
 -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
 -fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol
@@ -6012,6 +6013,81 @@ at @option{-O} and higher.
 Perform linear loop transformations on tree.  This flag can improve cache
 performance and allow further loop optimizations to take place.
 
+@item -floop-interchange
+Perform loop interchange transformations on loops.  Interchanging two
+nested loops switches the inner and outer loops.  For example, given a
+loop like:
+@smallexample
+DO J = 1, M
+  DO I = 1, N
+    A(J, I) = A(J, I) * C
+  ENDDO
+ENDDO
+@end smallexample
+loop interchange will transform the loop as if the user had written:
+@smallexample
+DO I = 1, N
+  DO J = 1, M
+    A(J, I) = A(J, I) * C
+  ENDDO
+ENDDO
+@end smallexample
+which can be beneficial when @code{N} is larger than the caches,
+because in Fortran, the elements of an array are stored in memory
+contiguously by column, and the original loop iterates over rows,
+potentially creating at each access a cache miss.  This optimization
+applies to all the languages supported by GCC and is not limited to
+Fortran.
+
+@item -floop-strip-mine
+Perform loop strip mining transformations on loops.  Strip mining
+splits a loop into two nested loops.  The outer loop has strides 
+equal to the strip size and the inner loop has strides of the 
+original loop within a strip.  For example, given a loop like:
+@smallexample
+DO I = 1, N
+  A(I) = A(I) + C
+ENDDO
+@end smallexample
+loop strip mining will transform the loop as if the user had written:
+@smallexample
+DO II = 1, N, 4
+  DO I = II, min (II + 4, N)
+    A(I) = A(I) + C
+  ENDDO
+ENDDO
+@end smallexample
+This optimization applies to all the languages supported by GCC and is
+not limited to Fortran.
+
+@item -floop-block
+Perform loop blocking transformations on loops.  Blocking strip mines
+each loop in the loop nest such that the memory accesses of the
+element loops fit inside caches.  For example, given a loop like:
+@smallexample
+DO I = 1, N
+  DO J = 1, M
+    A(J, I) = B(I) + C(J)
+  ENDDO
+ENDDO
+@end smallexample
+loop blocking will transform the loop as if the user had written:
+@smallexample
+DO II = 1, N, 64
+  DO JJ = 1, M, 64
+    DO I = II, min (II + 64, N)
+      DO J = JJ, min (JJ + 64, M)
+        A(J, I) = B(I) + C(J)
+      ENDDO
+    ENDDO
+  ENDDO
+ENDDO
+@end smallexample
+which can be beneficial when @code{M} is larger than the caches,
+because the innermost loop will iterate over a smaller amount of data
+that can be kept in the caches.  This optimization applies to all the
+languages supported by GCC and is not limited to Fortran.
+
 @item -fcheck-data-deps
 @opindex fcheck-data-deps
 Compare the results of several data dependence analyzers.  This option
index e8d10e2..9df289c 100644 (file)
@@ -40,6 +40,15 @@ Print the tree that is $ in C syntax.
 Works only when an inferior is executing.
 end
 
+define pgg
+set debug_gimple_stmt ($)
+end
+
+document pgg
+Print the Gimple statement that is $ in C syntax.
+Works only when an inferior is executing.
+end
+
 define pgs
 set debug_generic_stmt ($)
 end
index e8c0ad6..ca8e644 100644 (file)
@@ -38,6 +38,12 @@ DEF_VEC_P(gimple_seq);
 DEF_VEC_ALLOC_P(gimple_seq,gc);
 DEF_VEC_ALLOC_P(gimple_seq,heap);
 
+/* For each block, the PHI nodes that need to be rewritten are stored into
+   these vectors.  */
+typedef VEC(gimple, heap) *gimple_vec;
+DEF_VEC_P (gimple_vec);
+DEF_VEC_ALLOC_P (gimple_vec, heap);
+
 enum gimple_code {
 #define DEFGSCODE(SYM, STRING, STRUCT) SYM,
 #include "gimple.def"
diff --git a/gcc/graphite.c b/gcc/graphite.c
new file mode 100644 (file)
index 0000000..86b0eae
--- /dev/null
@@ -0,0 +1,4806 @@
+/* Gimple Represented as Polyhedra.
+   Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+   Contributed by Sebastian Pop <sebastian.pop@inria.fr>.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+/* This pass converts GIMPLE to GRAPHITE, performs some loop
+   transformations and then converts the resulting representation back
+   to GIMPLE.  
+
+   An early description of this pass can be found in the GCC Summit'06
+   paper "GRAPHITE: Polyhedral Analyses and Optimizations for GCC".
+   The wiki page http://gcc.gnu.org/wiki/Graphite contains pointers to
+   the related work.  
+
+   One important document to read is CLooG's internal manual:
+   http://repo.or.cz/w/cloog-ppl.git?a=blob_plain;f=doc/cloog.texi;hb=HEAD
+   that describes the data structure of loops used in this file, and
+   the functions that are used for transforming the code.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "ggc.h"
+#include "tree.h"
+#include "rtl.h"
+#include "basic-block.h"
+#include "diagnostic.h"
+#include "tree-flow.h"
+#include "toplev.h"
+#include "tree-dump.h"
+#include "timevar.h"
+#include "cfgloop.h"
+#include "tree-chrec.h"
+#include "tree-data-ref.h"
+#include "tree-scalar-evolution.h"
+#include "tree-pass.h"
+#include "domwalk.h"
+#include "pointer-set.h"
+#include "gimple.h"
+
+#ifdef HAVE_cloog
+#include "cloog/cloog.h"
+#include "graphite.h"
+
+static VEC (scop_p, heap) *current_scops;
+
+/* Debug the list of old induction variables for this SCOP.  */
+
+void
+debug_oldivs (scop_p scop)
+{
+  int i;
+  name_tree oldiv;
+
+  fprintf (stderr, "Old IVs:");
+
+  for (i = 0; VEC_iterate (name_tree, SCOP_OLDIVS (scop), i, oldiv); i++)
+    {
+      fprintf (stderr, "(");
+      print_generic_expr (stderr, oldiv->t, 0);
+      fprintf (stderr, ", %s, %d)\n", oldiv->name, oldiv->loop->num);
+    }
+  fprintf (stderr, "\n");
+}
+
+/* Debug the loops around basic block GB.  */
+
+void
+debug_loop_vec (graphite_bb_p gb)
+{
+  int i;
+  loop_p loop;
+
+  fprintf (stderr, "Loop Vec:");
+
+  for (i = 0; VEC_iterate (loop_p, GBB_LOOPS (gb), i, loop); i++)
+    fprintf (stderr, "%d: %d, ", i, loop ? loop->num : -1);
+
+  fprintf (stderr, "\n");
+}
+
+/* Push (IV, NAME) on STACK.  */
+
+static void 
+loop_iv_stack_push (loop_iv_stack stack, tree iv, const char *name)
+{
+  name_tree named_iv = XNEW (struct name_tree);
+
+  named_iv->t = iv;
+  named_iv->name = name;
+  VEC_safe_push (name_tree, heap, *stack, named_iv);
+}
+
+/* Pops an element out of STACK.  */
+
+static void
+loop_iv_stack_pop (loop_iv_stack stack)
+{
+  VEC_pop (name_tree, *stack);
+}
+
+/* Get the IV at INDEX in STACK.  */
+
+static tree
+loop_iv_stack_get_iv (loop_iv_stack stack, int index)
+{
+  name_tree named_iv = VEC_index (name_tree, *stack, index);
+
+  return named_iv->t;
+}
+
+/* Get the IV from its NAME in STACK.  */
+
+static tree
+loop_iv_stack_get_iv_from_name (loop_iv_stack stack, const char* name)
+{
+  int i;
+  name_tree iv;
+
+  for (i = 0; VEC_iterate (name_tree, *stack, i, iv); i++)
+    if (!strcmp (name, iv->name))
+      return iv->t;
+
+  return NULL;
+}
+
+/* Prints on stderr the contents of STACK.  */
+
+void
+loop_iv_stack_debug (loop_iv_stack stack)
+{
+  int i;
+  name_tree iv;
+  bool first = true;
+
+  fprintf (stderr, "(");
+
+  for (i = 0; VEC_iterate (name_tree, *stack, i, iv); i++)
+    {
+      if (first) 
+       first = false;
+      else
+       fprintf (stderr, " ");
+      fprintf (stderr, "%s:", iv->name);
+      print_generic_expr (stderr, iv->t, 0);
+    }
+
+  fprintf (stderr, ")\n");
+}
+
+/* In SCOP, get the induction variable from NAME.  OLD is the original
+   loop that contained the definition of NAME.  */
+
+static name_tree
+get_old_iv_from_ssa_name (scop_p scop, loop_p old, tree name)
+{
+  tree var = SSA_NAME_VAR (name);
+  int i;
+  name_tree oldiv;
+  
+  for (i = 0; VEC_iterate (name_tree, SCOP_OLDIVS (scop), i, oldiv); i++)
+    {
+      loop_p current = old;
+
+      while (current)
+       {
+         if (var == oldiv->t
+             && oldiv->loop == current)
+           return oldiv;
+
+         current = loop_outer (current);
+       }
+    }
+  return NULL;
+
+}
+
+/* Returns a new loop_to_cloog_loop_str structure.  */
+
+static inline struct loop_to_cloog_loop_str *
+new_loop_to_cloog_loop_str (int loop_num,
+                            int loop_position,
+                            CloogLoop *cloog_loop)
+{
+  struct loop_to_cloog_loop_str *result;
+
+  result = XNEW (struct loop_to_cloog_loop_str);
+  result->loop_num = loop_num;
+  result->cloog_loop = cloog_loop;
+  result->loop_position = loop_position;
+
+  return result;
+}
+
+/* Hash function for SCOP_LOOP2CLOOG_LOOP hash table.  */
+
+static hashval_t
+hash_loop_to_cloog_loop (const void *elt)
+{
+  return ((const struct loop_to_cloog_loop_str *) elt)->loop_num;
+}
+
+/* Equality function for SCOP_LOOP2CLOOG_LOOP hash table.  */
+
+static int
+eq_loop_to_cloog_loop (const void *el1, const void *el2)
+{
+  const struct loop_to_cloog_loop_str *elt1, *elt2;
+
+  elt1 = (const struct loop_to_cloog_loop_str *) el1;
+  elt2 = (const struct loop_to_cloog_loop_str *) el2;
+  return elt1->loop_num == elt2->loop_num;
+}
+
+/* Compares two graphite bbs and returns an integer less than, equal to, or
+   greater than zero if the first argument is considered to be respectively
+   less than, equal to, or greater than the second. 
+   We compare using the lexicographic order of the static schedules.  */
+
+static int 
+gbb_compare (const void *p_1, const void *p_2)
+{
+  const struct graphite_bb *const gbb_1
+    = *(const struct graphite_bb *const*) p_1;
+  const struct graphite_bb *const gbb_2
+    = *(const struct graphite_bb *const*) p_2;
+
+  return lambda_vector_compare (GBB_STATIC_SCHEDULE (gbb_1),
+                                gbb_nb_loops (gbb_1) + 1,
+                                GBB_STATIC_SCHEDULE (gbb_2),
+                                gbb_nb_loops (gbb_2) + 1);
+}
+
+/* Sort graphite bbs in SCOP.  */
+
+static void
+graphite_sort_gbbs (scop_p scop)
+{
+  VEC (graphite_bb_p, heap) *bbs = SCOP_BBS (scop);
+
+  qsort (VEC_address (graphite_bb_p, bbs),
+         VEC_length (graphite_bb_p, bbs),
+         sizeof (graphite_bb_p), gbb_compare);
+}
+
+/* Dump conditions of a graphite basic block GBB on FILE.  */
+
+static void
+dump_gbb_conditions (FILE *file, graphite_bb_p gbb)
+{
+  int i;
+  gimple stmt;
+  VEC (gimple, heap) *conditions = GBB_CONDITIONS (gbb);
+  
+  if (VEC_empty (gimple, conditions))
+    return;
+
+  fprintf (file, "\tbb %d\t: cond = {", GBB_BB (gbb)->index);
+
+  for (i = 0; VEC_iterate (gimple, conditions, i, stmt); i++)
+    print_gimple_stmt (file, stmt, 0, 0);
+
+  fprintf (file, "}\n");
+}
+
+/* Converts the graphite scheduling function into a cloog scattering
+   matrix.  This scattering matrix is used to limit the possible cloog
+   output to valid programs in respect to the scheduling function. 
+
+   SCATTERING_DIMENSIONS specifies the dimensionality of the scattering
+   matrix. CLooG 0.14.0 and previous versions require, that all scattering
+   functions of one CloogProgram have the same dimensionality, therefore we
+   allow to specify it. (Should be removed in future versions)  */
+
+static CloogMatrix *
+schedule_to_scattering (graphite_bb_p gb, int scattering_dimensions) 
+{
+  int i;
+  scop_p scop = GBB_SCOP (gb);
+
+  int nb_iterators = gbb_nb_loops (gb);
+
+  /* The cloog scattering matrix consists of these colums:
+     1                        col  = Eq/Inq,
+     scattering_dimensions    cols = Scattering dimensions,
+     nb_iterators             cols = bb's iterators,
+     scop_nb_params        cols = Parameters,
+     1                        col  = Constant 1.
+
+     Example:
+
+     scattering_dimensions = 5
+     max_nb_iterators = 2
+     nb_iterators = 1 
+     scop_nb_params = 2
+
+     Schedule:
+     ? i
+     4 5
+
+     Scattering Matrix:
+     s1  s2  s3  s4  s5  i   p1  p2  1 
+     1   0   0   0   0   0   0   0  -4  = 0
+     0   1   0   0   0  -1   0   0   0  = 0
+     0   0   1   0   0   0   0   0  -5  = 0  */
+  int nb_params = scop_nb_params (scop);
+  int nb_cols = 1 + scattering_dimensions + nb_iterators + nb_params + 1;
+  int col_const = nb_cols - 1; 
+  int col_iter_offset = 1 + scattering_dimensions;
+
+  CloogMatrix *scat = cloog_matrix_alloc (scattering_dimensions, nb_cols);
+
+  gcc_assert (scattering_dimensions >= nb_iterators * 2 + 1);
+
+  /* Initialize the identity matrix.  */
+  for (i = 0; i < scattering_dimensions; i++)
+    value_set_si (scat->p[i][i + 1], 1);
+
+  /* Textual order outside the first loop */
+  value_set_si (scat->p[0][col_const], -GBB_STATIC_SCHEDULE (gb)[0]);
+
+  /* For all surrounding loops.  */
+  for (i = 0;  i < nb_iterators; i++)
+    {
+      int schedule = GBB_STATIC_SCHEDULE (gb)[i + 1];
+
+      /* Iterations of this loop.  */
+      value_set_si (scat->p[2 * i + 1][col_iter_offset + i], -1);
+
+      /* Textual order inside this loop.  */
+      value_set_si (scat->p[2 * i + 2][col_const], -schedule);
+    }
+
+  return scat; 
+}
+
+/* Print the schedules of GB to FILE with INDENT white spaces before.
+   VERBOSITY determines how verbose the code pretty printers are.  */
+
+void
+print_graphite_bb (FILE *file, graphite_bb_p gb, int indent, int verbosity)
+{
+  CloogMatrix *scattering;
+  int i;
+  loop_p loop;
+  fprintf (file, "\nGBB (\n");
+
+  print_loops_bb (file, GBB_BB (gb), indent+2, verbosity);
+
+  if (GBB_DOMAIN (gb))
+    {
+      fprintf (file, "       (domain: \n");
+      cloog_matrix_print (dump_file, GBB_DOMAIN (gb));
+      fprintf (file, "       )\n");
+    }
+
+  if (GBB_STATIC_SCHEDULE (gb))
+    {
+      fprintf (file, "       (static schedule: ");
+      print_lambda_vector (file, GBB_STATIC_SCHEDULE (gb),
+                          gbb_nb_loops (gb) + 1);
+      fprintf (file, "       )\n");
+    }
+
+  if (GBB_LOOPS (gb))
+    {
+      fprintf (file, "       (contained loops: \n");
+      for (i = 0; VEC_iterate (loop_p, GBB_LOOPS (gb), i, loop); i++)
+       if (loop == NULL)
+         fprintf (file, "       iterator %d   =>  NULL \n", i); 
+       else
+         fprintf (file, "       iterator %d   =>  loop %d \n", i,
+                  loop->num);
+      fprintf (file, "       )\n");
+    }
+
+  if (GBB_DATA_REFS (gb))
+    dump_data_references (file, GBB_DATA_REFS (gb));
+
+  if (GBB_CONDITIONS (gb))
+    {
+      fprintf (file, "       (conditions: \n");
+      dump_gbb_conditions (dump_file, gb);
+      fprintf (file, "       )\n");
+    }
+
+  if (GBB_SCOP (gb)
+      && GBB_STATIC_SCHEDULE (gb))
+    {
+      fprintf (file, "       (scattering: \n");
+      scattering = schedule_to_scattering (gb, 2 * gbb_nb_loops (gb) + 1);
+      cloog_matrix_print (file, scattering);
+      cloog_matrix_free (scattering);
+      fprintf (file, "       )\n");
+    }
+
+  fprintf (file, ")\n");
+}
+
+/* Print to STDERR the schedules of GB with VERBOSITY level.  */
+
+void
+debug_gbb (graphite_bb_p gb, int verbosity)
+{
+  print_graphite_bb (stderr, gb, 0, verbosity);
+}
+
+
+/* Print SCOP to FILE.  VERBOSITY determines how verbose the pretty
+   printers are.  */
+
+static void
+print_scop (FILE *file, scop_p scop, int verbosity)
+{
+  if (scop == NULL)
+    return;
+
+  fprintf (file, "\nSCoP_%d_%d (\n",
+          SCOP_ENTRY (scop)->index, SCOP_EXIT (scop)->index);
+
+  fprintf (file, "       (cloog: \n");
+  cloog_program_print (file, SCOP_PROG (scop));
+  fprintf (file, "       )\n");
+
+  if (SCOP_BBS (scop))
+    {
+      graphite_bb_p gb;
+      int i;
+
+      for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+       print_graphite_bb (file, gb, 0, verbosity);
+    }
+
+  fprintf (file, ")\n");
+}
+
+/* Print all the SCOPs to FILE.  VERBOSITY determines how verbose the
+   code pretty printers are.  */
+
+static void
+print_scops (FILE *file, int verbosity)
+{
+  int i;
+  scop_p scop;
+
+  for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++)
+    print_scop (file, scop, verbosity);
+}
+
+/* Debug SCOP.  VERBOSITY determines how verbose the code pretty
+   printers are. */
+
+void
+debug_scop (scop_p scop, int verbosity)
+{
+  print_scop (stderr, scop, verbosity);
+}
+
+/* Debug all SCOPs from CURRENT_SCOPS.  VERBOSITY determines how
+   verbose the code pretty printers are.  */
+
+void 
+debug_scops (int verbosity)
+{
+  print_scops (stderr, verbosity);
+}
+
+/* Return true when BB is contained in SCOP.  */
+
+static inline bool
+bb_in_scop_p (basic_block bb, scop_p scop)
+{
+  return bitmap_bit_p (SCOP_BBS_B (scop), bb->index);
+}
+
+/* Pretty print to FILE the SCOP in DOT format.  */
+
+static void 
+dot_scop_1 (FILE *file, scop_p scop)
+{
+  edge e;
+  edge_iterator ei;
+  basic_block bb;
+  basic_block entry = SCOP_ENTRY (scop);
+  basic_block exit = SCOP_EXIT (scop);
+    
+  fprintf (file, "digraph SCoP_%d_%d {\n", entry->index,
+          exit->index);
+
+  FOR_ALL_BB (bb)
+    {
+      if (bb == entry)
+       fprintf (file, "%d [shape=triangle];\n", bb->index);
+
+      if (bb == exit)
+       fprintf (file, "%d [shape=box];\n", bb->index);
+
+      if (bb_in_scop_p (bb, scop)) 
+       fprintf (file, "%d [color=red];\n", bb->index);
+
+      FOR_EACH_EDGE (e, ei, bb->succs)
+       fprintf (file, "%d -> %d;\n", bb->index, e->dest->index);
+    }
+
+  fputs ("}\n\n", file);
+}
+
+/* Display SCOP using dotty.  */
+
+void
+dot_scop (scop_p scop)
+{
+  dot_scop_1 (stderr, scop);
+}
+
+/* Pretty print all SCoPs in DOT format and mark them with different colors.
+   If there are not enough colors, paint later SCoPs gray.
+   Special nodes:
+   - "*" after the node number: entry of a SCoP,
+   - "#" after the node number: exit of a SCoP,
+   - "()" entry or exit not part of SCoP.  */
+
+static void
+dot_all_scops_1 (FILE *file)
+{
+  basic_block bb;
+  edge e;
+  edge_iterator ei;
+  scop_p scop;
+  const char* color;
+  int i;
+
+  /* Disable debugging while printing graph.  */
+  int tmp_dump_flags = dump_flags;
+  dump_flags = 0;
+
+  fprintf (file, "digraph all {\n");
+
+  FOR_ALL_BB (bb)
+    {
+      int part_of_scop = false;
+
+      /* Use HTML for every bb label.  So we are able to print bbs
+         which are part of two different SCoPs, with two different
+         background colors.  */
+      fprintf (file, "%d [label=<\n  <TABLE BORDER=\"0\" CELLBORDER=\"1\" ",
+                     bb->index);
+      fprintf (file, "CELLSPACING=\"0\">\n");
+
+      /* Select color for SCoP.  */
+      for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++)
+       if (bb_in_scop_p (bb, scop)
+           || (SESE_EXIT (SCOP_REGION (scop)) && SCOP_EXIT (scop) == bb)
+           || (SESE_ENTRY (SCOP_REGION (scop)) && SCOP_ENTRY (scop) == bb))
+         {
+           switch (i % 17)
+             {
+             case 0: /* red */
+               color = "#e41a1c";
+               break;
+             case 1: /* blue */
+               color = "#377eb8";
+               break;
+             case 2: /* green */
+               color = "#4daf4a";
+               break;
+             case 3: /* purple */
+               color = "#984ea3";
+               break;
+             case 4: /* orange */
+               color = "#ff7f00";
+               break;
+             case 5: /* yellow */
+               color = "#ffff33";
+               break;
+             case 6: /* brown */
+               color = "#a65628";
+               break;
+             case 7: /* rose */
+               color = "#f781bf";
+               break;
+             case 8:
+               color = "#8dd3c7";
+               break;
+             case 9:
+               color = "#ffffb3";
+               break;
+             case 10:
+               color = "#bebada";
+               break;
+             case 11:
+               color = "#fb8072";
+               break;
+             case 12:
+               color = "#80b1d3";
+               break;
+             case 13:
+               color = "#fdb462";
+               break;
+             case 14:
+               color = "#b3de69";
+               break;
+             case 15:
+               color = "#fccde5";
+               break;
+             case 16:
+               color = "#bc80bd";
+               break;
+             default: /* gray */
+               color = "#999999";
+             }
+
+           fprintf (file, "    <TR><TD WIDTH=\"50\" BGCOLOR=\"%s\">", color);
+        
+           if (!bb_in_scop_p (bb, scop))
+             fprintf (file, " ("); 
+
+           if (SESE_ENTRY (SCOP_REGION (scop))
+               && SESE_EXIT (SCOP_REGION (scop))
+               && bb == SCOP_ENTRY (scop)
+               && bb == SCOP_EXIT (scop))
+             fprintf (file, " %d*# ", bb->index);
+           else if (SESE_ENTRY (SCOP_REGION (scop))
+                    && bb == SCOP_ENTRY (scop))
+             fprintf (file, " %d* ", bb->index);
+           else if (SESE_EXIT (SCOP_REGION (scop))
+                    && bb == SCOP_EXIT (scop))
+             fprintf (file, " %d# ", bb->index);
+           else
+             fprintf (file, " %d ", bb->index);
+
+           if (!bb_in_scop_p (bb, scop))
+             fprintf (file, ")");
+
+           fprintf (file, "</TD></TR>\n");
+
+           part_of_scop  = true;
+         }
+
+      if (!part_of_scop)
+        {
+          fprintf (file, "    <TR><TD WIDTH=\"50\" BGCOLOR=\"#ffffff\">");
+          fprintf (file, " %d </TD></TR>\n", bb->index);
+        }
+
+      fprintf (file, "  </TABLE>>, shape=box, style=\"setlinewidth(0)\"]\n");
+    }
+
+  FOR_ALL_BB (bb)
+    {
+      FOR_EACH_EDGE (e, ei, bb->succs)
+             fprintf (file, "%d -> %d;\n", bb->index, e->dest->index);
+    }
+
+  fputs ("}\n\n", file);
+
+  /* Enable debugging again.  */
+  dump_flags = tmp_dump_flags;
+}
+
+/* Display all SCoPs using dotty.  */
+
+void
+dot_all_scops (void)
+{
+  /* When debugging, enable the following code.  This cannot be used
+     in production compilers because it calls "system".  */
+#if 0
+  FILE *stream = fopen ("/tmp/allscops.dot", "w");
+  gcc_assert (stream);
+
+  dot_all_scops_1 (stream);
+  fclose (stream);
+
+  system ("dotty /tmp/allscops.dot");
+#else
+  dot_all_scops_1 (stderr);
+#endif
+}
+
+/* Returns true when LOOP is in SCOP.  */
+
+static inline bool 
+loop_in_scop_p (struct loop *loop, scop_p scop)
+{
+  return (bb_in_scop_p (loop->header, scop)
+         && bb_in_scop_p (loop->latch, scop));
+}
+
+/* Returns the outermost loop in SCOP that contains BB.  */
+
+static struct loop *
+outermost_loop_in_scop (scop_p scop, basic_block bb)
+{
+  struct loop *nest;
+
+  nest = bb->loop_father;
+  while (loop_outer (nest) && loop_in_scop_p (loop_outer (nest), scop))
+    nest = loop_outer (nest);
+
+  return nest;
+}
+
+/* Return true when EXPR is an affine function in LOOP with parameters
+   instantiated relative to outermost_loop.  */
+
+static bool
+loop_affine_expr (struct loop *outermost_loop, struct loop *loop, tree expr)
+{
+  int n = outermost_loop->num;
+  tree scev = analyze_scalar_evolution (loop, expr);
+
+  scev = instantiate_scev (outermost_loop, loop, scev);
+
+  return (evolution_function_is_invariant_p (scev, n)
+         || evolution_function_is_affine_multivariate_p (scev, n));
+}
+
+/* Return true if the operand OP is simple.  */
+
+static bool
+is_simple_operand (loop_p loop, gimple stmt, tree op) 
+{
+  /* It is not a simple operand when it is a declaration,  */
+  if (DECL_P (op)
+      /* or a structure,  */
+      || AGGREGATE_TYPE_P (TREE_TYPE (op))
+      /* or a memory access that cannot be analyzed by the data
+        reference analysis.  */
+      || ((handled_component_p (op) || INDIRECT_REF_P (op))
+         && !stmt_simple_memref_p (loop, stmt, op)))
+    return false;
+
+  return true;
+}
+
+/* Return true only when STMT is simple enough for being handled by
+   Graphite.  This depends on OUTERMOST_LOOP, as the parametetrs are
+   initialized relative to this loop.  */
+
+static bool
+stmt_simple_for_scop_p (struct loop *outermost_loop, gimple stmt)
+{
+  basic_block bb = gimple_bb (stmt);
+  struct loop *loop = bb->loop_father;
+
+  /* GIMPLE_ASM and GIMPLE_CALL may embed arbitrary side effects.
+     Calls have side-effects, except those to const or pure
+     functions.  */
+  if (gimple_has_volatile_ops (stmt)
+      || (gimple_code (stmt) == GIMPLE_CALL
+         && !(gimple_call_flags (stmt) & (ECF_CONST | ECF_PURE)))
+      || (gimple_code (stmt) == GIMPLE_ASM))
+    return false;
+
+  switch (gimple_code (stmt))
+    {
+    case GIMPLE_RETURN:
+    case GIMPLE_LABEL:
+      return true;
+
+    case GIMPLE_COND:
+      {
+       tree op;
+       ssa_op_iter op_iter;
+        enum tree_code code = gimple_cond_code (stmt);
+
+        /* We can only handle this kind of conditional expressions.  
+           For inequalities like "if (i != 3 * k)" we need unions of
+           polyhedrons.  Expressions like  "if (a)" or "if (a == 15)" need
+           them for the else branch.  */
+        if (!(code == LT_EXPR
+             || code == GT_EXPR
+              || code == LE_EXPR
+             || code == GE_EXPR))
+          return false;
+
+       if (!outermost_loop)
+         return false;
+
+       FOR_EACH_SSA_TREE_OPERAND (op, stmt, op_iter, SSA_OP_ALL_USES)
+         if (!loop_affine_expr (outermost_loop, loop, op))
+           return false;
+
+       return true;
+      }
+
+    case GIMPLE_ASSIGN:
+      {
+       enum tree_code code = gimple_assign_rhs_code (stmt);
+
+       switch (get_gimple_rhs_class (code))
+         {
+         case GIMPLE_UNARY_RHS:
+         case GIMPLE_SINGLE_RHS:
+           return (is_simple_operand (loop, stmt, gimple_assign_lhs (stmt))
+                   && is_simple_operand (loop, stmt, gimple_assign_rhs1 (stmt)));
+
+         case GIMPLE_BINARY_RHS:
+           return (is_simple_operand (loop, stmt, gimple_assign_lhs (stmt))
+                   && is_simple_operand (loop, stmt, gimple_assign_rhs1 (stmt))
+                   && is_simple_operand (loop, stmt, gimple_assign_rhs2 (stmt)));
+
+         case GIMPLE_INVALID_RHS:
+         default:
+           gcc_unreachable ();
+         }
+      }
+
+    case GIMPLE_CALL:
+      {
+       size_t i;
+       size_t n = gimple_call_num_args (stmt);
+       tree lhs = gimple_call_lhs (stmt);
+
+       for (i = 0; i < n; i++)
+         {
+           tree arg = gimple_call_arg (stmt, i);
+
+           if (!(is_simple_operand (loop, stmt, lhs)
+                 && is_simple_operand (loop, stmt, arg)))
+             return false;
+         }
+
+       return true;
+      }
+
+    default:
+      /* These nodes cut a new scope.  */
+      return false;
+    }
+
+  return false;
+}
+
+/* Returns the statement of BB that contains a harmful operation: that
+   can be a function call with side effects, data dependences that
+   cannot be computed in OUTERMOST_LOOP, the induction variables are
+   not linear with respect to OUTERMOST_LOOP, etc.  The current open
+   scop should end before this statement.  */
+
+static gimple
+harmful_stmt_in_bb (struct loop *outermost_loop, basic_block bb)
+{
+  gimple_stmt_iterator gsi;
+
+  for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+    if (!stmt_simple_for_scop_p (outermost_loop, gsi_stmt (gsi)))
+      return gsi_stmt (gsi);
+
+  return NULL;
+}
+
+/* Store the GRAPHITE representation of BB.  */
+
+static void
+new_graphite_bb (scop_p scop, basic_block bb)
+{
+  struct graphite_bb *gbb = XNEW (struct graphite_bb);
+
+  bb->aux = gbb;
+  GBB_BB (gbb) = bb;
+  GBB_SCOP (gbb) = scop;
+  GBB_DATA_REFS (gbb) = NULL; 
+  GBB_DOMAIN (gbb) = NULL;
+  GBB_CONDITIONS (gbb) = NULL;
+  GBB_CONDITION_CASES (gbb) = NULL;
+  GBB_LOOPS (gbb) = NULL;
+  VEC_safe_push (graphite_bb_p, heap, SCOP_BBS (scop), gbb);
+  bitmap_set_bit (SCOP_BBS_B (scop), bb->index);
+}
+
+/* Frees GBB.  */
+
+static void
+free_graphite_bb (struct graphite_bb *gbb)
+{
+  if (GBB_DOMAIN (gbb))
+    cloog_matrix_free (GBB_DOMAIN (gbb));
+
+  free_data_refs (GBB_DATA_REFS (gbb));
+  VEC_free (gimple, heap, GBB_CONDITIONS (gbb));
+  VEC_free (gimple, heap, GBB_CONDITION_CASES (gbb));
+  VEC_free (loop_p, heap, GBB_LOOPS (gbb));
+
+  GBB_BB (gbb)->aux = 0;
+  XDELETE (gbb);
+}
+
+/* Creates a new scop starting with ENTRY.  */
+
+static scop_p
+new_scop (edge entry)
+{
+  scop_p scop = XNEW (struct scop);
+
+  SCOP_REGION (scop) = XNEW (struct sese);
+  SESE_ENTRY (SCOP_REGION (scop)) = entry;
+  SESE_EXIT (SCOP_REGION (scop)) = NULL;
+  SCOP_BBS (scop) = VEC_alloc (graphite_bb_p, heap, 3);
+  SCOP_OLDIVS (scop) = VEC_alloc (name_tree, heap, 3);
+  SCOP_BBS_B (scop) = BITMAP_ALLOC (NULL);
+  SCOP_LOOPS (scop) = BITMAP_ALLOC (NULL);
+  SCOP_LOOP_NEST (scop) = VEC_alloc (loop_p, heap, 3);
+  SCOP_PARAMS (scop) = VEC_alloc (name_tree, heap, 3);
+  SCOP_PROG (scop) = cloog_program_malloc ();
+  cloog_program_set_names (SCOP_PROG (scop), cloog_names_malloc ());
+  SCOP_LOOP2CLOOG_LOOP (scop) = htab_create (10, hash_loop_to_cloog_loop,
+                                            eq_loop_to_cloog_loop,
+                                            free);
+  return scop;
+}
+
+/* Deletes SCOP.  */
+
+static void
+free_scop (scop_p scop)
+{
+  int i;
+  name_tree p;
+  struct graphite_bb *gb;
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+    free_graphite_bb (gb);
+
+  VEC_free (graphite_bb_p, heap, SCOP_BBS (scop));
+  BITMAP_FREE (SCOP_BBS_B (scop));
+  BITMAP_FREE (SCOP_LOOPS (scop));
+  VEC_free (loop_p, heap, SCOP_LOOP_NEST (scop));
+  VEC_free (name_tree, heap, SCOP_OLDIVS (scop));
+  
+  for (i = 0; VEC_iterate (name_tree, SCOP_PARAMS (scop), i, p); i++)
+    free (p);
+
+  VEC_free (name_tree, heap, SCOP_PARAMS (scop));
+  cloog_program_free (SCOP_PROG (scop));
+  htab_delete (SCOP_LOOP2CLOOG_LOOP (scop)); 
+  XDELETE (SCOP_REGION (scop));
+  XDELETE (scop);
+}
+
+/* Deletes all scops in SCOPS.  */
+
+static void
+free_scops (VEC (scop_p, heap) *scops)
+{
+  int i;
+  scop_p scop;
+
+  for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
+    free_scop (scop);
+
+  VEC_free (scop_p, heap, scops);
+}
+
+typedef enum gbb_type {
+  GBB_UNKNOWN,
+  GBB_LOOP_SING_EXIT_HEADER,
+  GBB_LOOP_MULT_EXIT_HEADER,
+  GBB_LOOP_EXIT,
+  GBB_COND_HEADER,
+  GBB_SIMPLE,
+  GBB_LAST
+} gbb_type;
+
+/* Detect the type of BB.  Loop headers are only marked, if they are
+   new.  This means their loop_father is different to LAST_LOOP.
+   Otherwise they are treated like any other bb and their type can be
+   any other type.  */
+
+static gbb_type
+get_bb_type (basic_block bb, struct loop *last_loop)
+{
+  VEC (basic_block, heap) *dom;
+  int nb_dom, nb_suc;
+  struct loop *loop = bb->loop_father;
+
+  /* Check, if we entry into a new loop. */
+  if (loop != last_loop)
+    {
+      if (single_exit (loop) != NULL)
+        return GBB_LOOP_SING_EXIT_HEADER;
+      else if (loop->num != 0)
+        return GBB_LOOP_MULT_EXIT_HEADER;
+      else
+       return GBB_COND_HEADER;
+    }
+
+  dom = get_dominated_by (CDI_DOMINATORS, bb);
+  nb_dom = VEC_length (basic_block, dom);
+  VEC_free (basic_block, heap, dom);
+  if (nb_dom == 0)
+    return GBB_LAST;
+
+  nb_suc = VEC_length (edge, bb->succs);
+  if (nb_dom == 1 && nb_suc == 1)
+    return GBB_SIMPLE;
+
+  return GBB_COND_HEADER;
+}
+
+/* Moves the scops from SOURCE to TARGET and clean up SOURCE.  */
+
+static void
+move_scops (VEC (scop_p, heap) **source, VEC (scop_p, heap) **target)
+{
+  scop_p s;
+  int i;
+
+  for (i = 0; VEC_iterate (scop_p, *source, i, s); i++)
+    VEC_safe_push (scop_p, heap, *target, s);
+  
+  VEC_free (scop_p, heap, *source);
+}
+
+/* Store information needed by scopdet_* functions.  */
+
+struct scopdet_info
+{
+  /* Where the last open scop would stop if the current BB is harmful.  */
+  edge last;
+
+  /* Where the next scop would start if the current BB is harmful.  */
+  edge next;
+
+  /* The bb or one of its children contains open loop exits.  That means
+     loop exit nodes that are not surrounded by a loop dominated by bb.  */ 
+  bool exits;
+
+  /* The bb or one of its children contains only structures we can handle.  */ 
+  bool difficult;
+};
+
+static struct scopdet_info build_scops_1 (edge, VEC (scop_p, heap) **,
+                                          loop_p, loop_p);
+
+/* Checks, if a bb can be added to a SCoP.  */
+
+static struct scopdet_info 
+scopdet_edge_info (edge ee, loop_p outermost_loop,
+                  VEC (scop_p, heap) **scops, gbb_type type, gimple *stmt)
+              
+{
+  basic_block bb = ee->dest;
+  struct loop *loop = bb->loop_father;
+  struct scopdet_info result;
+
+  *stmt = harmful_stmt_in_bb (outermost_loop, bb);
+  result.difficult = (*stmt != NULL);
+  result.last = NULL;
+
+  switch (type)
+    {
+    case GBB_LAST:
+      result.next = NULL;
+      result.exits = false;
+      result.last = ee;
+      break;
+
+    case GBB_SIMPLE:
+      result.next = single_succ_edge (bb);
+      result.exits = false;
+      result.last = ee;
+      break;
+
+    case GBB_LOOP_SING_EXIT_HEADER:
+      {
+        VEC (scop_p, heap) *tmp_scops = VEC_alloc (scop_p, heap, 3);
+        struct scopdet_info sinfo;
+
+        sinfo = build_scops_1 (ee, &tmp_scops, loop, outermost_loop);
+
+        result.last = single_exit (bb->loop_father);
+
+       if (single_succ_p (result.last->dest)
+           && get_bb_type (result.last->dest, loop) == GBB_SIMPLE)
+         result.next = single_succ_edge (result.last->dest);
+       else
+         result.next = split_block (result.last->dest, NULL);
+
+        /* If we do not dominate result.next, remove it.  It's either
+           the EXIT_BLOCK_PTR, or another bb dominates it and will
+           call the scop detection for this bb.  */
+        if (!dominated_by_p (CDI_DOMINATORS, result.next->dest, bb))
+          result.next = NULL;
+
+        if (TREE_CODE (number_of_latch_executions (loop))
+            == SCEV_NOT_KNOWN)
+          result.difficult = true;
+
+        if (sinfo.difficult)
+          move_scops (&tmp_scops, scops);
+        else 
+          free_scops (tmp_scops);
+
+        result.exits = false;
+        result.difficult |= sinfo.difficult;
+        break;
+      }
+
+    case GBB_LOOP_MULT_EXIT_HEADER:
+      {
+        /* XXX: Handle loop nests with the same header.  */
+        /* XXX: Handle iterative optimization of outermost_loop.  */
+        /* XXX: For now we just do not join loops with multiple exits. If the 
+           exits lead to the same bb it may be possible to join the loop.  */
+        VEC (scop_p, heap) *tmp_scops = VEC_alloc (scop_p, heap, 3);
+        VEC (edge, heap) *exits = get_loop_exit_edges (loop);
+        edge e;
+        int i;
+        build_scops_1 (ee, &tmp_scops, loop, outermost_loop);
+
+        for (i = 0; VEC_iterate (edge, exits, i, e); i++)
+          if (dominated_by_p (CDI_DOMINATORS, e->dest, e->src)
+              && e->dest->loop_father == loop_outer (loop))
+            build_scops_1 (e, &tmp_scops, e->dest->loop_father,
+                           outermost_loop);
+
+        result.next = NULL; 
+        result.last = NULL;
+        result.difficult = true;
+        result.exits = false;
+        move_scops (&tmp_scops, scops);
+        VEC_free (edge, heap, exits);
+        break;
+      }
+    case GBB_COND_HEADER:
+      {
+       VEC (scop_p, heap) *tmp_scops = VEC_alloc (scop_p, heap, 3);
+       struct scopdet_info sinfo;
+       VEC (basic_block, heap) *dominated;
+       int i;
+       basic_block dom_bb;
+       basic_block last_bb = NULL;
+       edge last_e = NULL;
+       edge e;
+       result.exits = false;
+       /* First check the successors of BB, and check if it is possible to join
+          the different branches.  */
+       for (i = 0; VEC_iterate (edge, bb->succs, i, e); i++)
+         {
+           /* Ignore loop exits.  They will be handled after the loop body.  */
+           if (is_loop_exit (loop, e->dest))
+             {
+               result.exits = true;
+               continue;
+             }
+
+           /* Do not follow edges that lead to the end of the
+              conditions block.  For example, in
+
+               |   0
+              |  /|\
+              | 1 2 |
+              | | | |
+              | 3 4 |
+              |  \|/
+               |   6
+
+              the edge from 0 => 6.  Only check if all paths lead to
+              the same node 6.  */
+
+           if (!single_pred_p (e->dest))
+             {
+               /* Check, if edge leads directly to the end of this
+                  condition.  */
+               if (!last_bb)
+                 {
+                   last_bb = e->dest;
+                   last_e = e;
+                 }
+
+               if (e->dest != last_bb)
+                 result.difficult = true;
+
+               continue;
+             }
+
+           if (!dominated_by_p (CDI_DOMINATORS, e->dest, bb))
+             {
+               result.difficult = true;
+               continue;
+             }
+
+           sinfo = build_scops_1 (e, &tmp_scops, loop, outermost_loop);
+
+           result.exits |= sinfo.exits;
+           result.last = sinfo.last;
+           result.difficult |= sinfo.difficult; 
+
+           /* Checks, if all branches end at the same point. 
+              If that is true, the condition stays joinable.
+              Have a look at the example above.  */
+           if (sinfo.last && single_succ_p (sinfo.last->dest))
+             {
+               basic_block next_tmp = single_succ (sinfo.last->dest);
+                  
+               if (!last_bb)
+                 {
+                   last_bb = next_tmp;
+                   last_e = single_succ_edge (sinfo.last->dest);
+                 }
+
+               if (next_tmp != last_bb)
+                 result.difficult = true;
+             }
+           else
+             result.difficult = true;
+         }
+
+       /* If the condition is joinable.  */
+       if (!result.exits && !result.difficult)
+         {
+           /* Only return a next pointer if we dominate this pointer.
+              Otherwise it will be handled by the bb dominating it.  */ 
+           if (dominated_by_p (CDI_DOMINATORS, last_bb, bb) && last_bb != bb)
+             result.next = last_e;
+           else
+             result.next = NULL; 
+
+           move_scops (&tmp_scops, scops);
+           break;
+         }
+
+       /* Scan remaining bbs dominated by BB.  */
+       dominated = get_dominated_by (CDI_DOMINATORS, bb);
+
+       for (i = 0; VEC_iterate (basic_block, dominated, i, dom_bb); i++)
+         {
+           /* Ignore loop exits: they will be handled after the loop body.  */
+           if (is_loop_exit (loop, dom_bb))
+             {
+               result.exits = true;
+               continue;
+             }
+
+           /* Ignore the bbs processed above.  */
+           if (single_pred_p (dom_bb) && single_pred (dom_bb) == bb)
+             continue;
+
+           if (single_pred_p (dom_bb))
+             e = single_pred_edge (dom_bb);
+           else
+             e = split_block (dom_bb, NULL);
+
+           if (loop_depth (loop) > loop_depth (dom_bb->loop_father))
+             sinfo = build_scops_1 (e, &tmp_scops, loop_outer (loop),
+                                    outermost_loop);
+           else
+             sinfo = build_scops_1 (e, &tmp_scops, loop, outermost_loop);
+                                           
+                                     
+           result.exits |= sinfo.exits; 
+           result.difficult = true;
+           result.last = NULL;
+         }
+
+       VEC_free (basic_block, heap, dominated);
+
+       result.next = NULL; 
+       move_scops (&tmp_scops, scops);
+
+       break;
+      }
+
+    default:
+      gcc_unreachable ();
+    }
+
+  return result;
+}
+
+/* Split EXIT before STMT when STMT is non NULL.  */
+
+static edge
+split_difficult_bb (basic_block exit, edge *last, gimple stmt)
+{
+  if (stmt && VEC_length (edge, exit->preds) == 1)
+    {
+      edge e;
+
+      if (stmt == gsi_stmt (gsi_after_labels (exit)))
+       stmt = NULL;
+      else
+       {
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+         gsi_prev (&gsi);
+         stmt = gsi_stmt (gsi);
+       }
+
+      e = split_block (exit, stmt);
+      set_immediate_dominator (CDI_DOMINATORS, e->dest, e->src);
+      set_immediate_dominator (CDI_POST_DOMINATORS, e->src, e->dest);
+      exit = e->dest;
+
+      if (last)
+       *last = e;
+
+      return e;
+    }
+
+  return NULL;
+}
+
+/* End SCOP with edge EXIT.  */
+
+static void
+end_scop (scop_p scop, edge exit, bool split_entry)
+{
+  if (split_entry 
+      && !single_pred_p (SCOP_ENTRY (scop))
+      && exit->dest->loop_father == SCOP_ENTRY (scop)->loop_father)
+    SESE_ENTRY (SCOP_REGION (scop)) = split_block (SCOP_ENTRY (scop), NULL);
+
+  SESE_EXIT (SCOP_REGION (scop)) = exit;
+}
+
+/* Creates the SCoPs and writes entry and exit points for every SCoP.  */
+
+static struct scopdet_info 
+build_scops_1 (edge start, VEC (scop_p, heap) **scops, loop_p loop,
+              loop_p outermost_loop)
+{
+  edge current = start;
+
+  bool in_scop = false;
+  scop_p open_scop = NULL;
+  gimple stmt;
+  struct scopdet_info sinfo;
+
+  /* Initialize result.  */ 
+  struct scopdet_info result;
+  result.exits = false;
+  result.difficult = false;
+  result.next = NULL;
+  result.last = NULL;
+
+  /* Loop over the dominance tree.  If we meet a difficult bb, close
+     the current SCoP.  Loop and condition header start a new layer,
+     and can only be added if all bbs in deeper layers are simple.  */
+  while (current != NULL)
+    {
+      sinfo = scopdet_edge_info (current, outermost_loop, scops,
+                                get_bb_type (current->dest, loop), &stmt);
+
+      if (!in_scop && !(sinfo.exits || sinfo.difficult))
+        {
+         open_scop = new_scop (current);
+
+          VEC_safe_push (scop_p, heap, *scops, open_scop); 
+          in_scop = true;
+        }
+      else if (in_scop && (sinfo.exits || sinfo.difficult))
+        {
+         edge exit = split_difficult_bb (current->dest, &sinfo.last, stmt);
+
+         if (!exit)
+           exit = current;
+
+         end_scop (open_scop, exit, sinfo.difficult);
+          in_scop = false;
+        }
+
+      result.difficult |= sinfo.difficult;
+      result.exits |= sinfo.exits;
+
+      current = sinfo.next;
+    }
+
+  /* Finish the SCOP, if it is left open.  The exit is the bb, that
+     postdominates sinfo.last.  If no such bb exists, we use info.last
+     or delete the scop.  */
+  if (in_scop)
+    {
+      int i;
+      edge e;
+
+      for (i = 0; VEC_iterate (edge, sinfo.last->dest->succs, i, e); i++)
+        if (dominated_by_p (CDI_POST_DOMINATORS, sinfo.last->dest, e->dest))
+          {
+           edge exit = split_difficult_bb (e->dest, &sinfo.last, stmt);
+
+           if (exit)
+             end_scop (open_scop, exit, sinfo.difficult);
+           else
+             end_scop (open_scop, e, sinfo.difficult);
+
+           goto done;
+         }
+
+      if (SCOP_ENTRY (open_scop) != sinfo.last->dest)
+       {
+         edge exit = split_difficult_bb (sinfo.last->dest, NULL, stmt);
+
+         if (exit)
+           end_scop (open_scop, exit, sinfo.difficult);
+         else
+           end_scop (open_scop, sinfo.last, sinfo.difficult);
+       }
+      else
+       {
+         VEC_pop (scop_p, *scops);
+         free_scop (open_scop);
+        }
+    }
+
+ done:
+  result.last = sinfo.last;
+
+  return result;
+}
+
+/* Find static control parts.  */
+
+static void
+build_scops (void)
+{
+  struct loop *loop = current_loops->tree_root;
+  build_scops_1 (single_succ_edge (ENTRY_BLOCK_PTR), &current_scops, loop, loop);
+}
+
+/* Gather the basic blocks belonging to the SCOP.  */
+
+static void
+build_scop_bbs (scop_p scop)
+{
+  basic_block *stack = XNEWVEC (basic_block, n_basic_blocks + 1);
+  sbitmap visited = sbitmap_alloc (last_basic_block);
+  int sp = 0;
+
+  sbitmap_zero (visited);
+  stack[sp++] = SCOP_ENTRY (scop);
+
+  while (sp)
+    {
+      basic_block bb = stack[--sp];
+      int depth = loop_depth (bb->loop_father);
+      int num = bb->loop_father->num;
+      edge_iterator ei;
+      edge e;
+
+      /* Scop's exit is not in the scop.  Exclude also bbs, which are
+        dominated by the SCoP exit.  These are e.g. loop latches.  */
+      if (TEST_BIT (visited, bb->index)
+         || dominated_by_p (CDI_DOMINATORS, bb, SCOP_EXIT (scop))
+         /* Every block in the scop is dominated by scop's entry.  */
+         || !dominated_by_p (CDI_DOMINATORS, bb, SCOP_ENTRY (scop)))
+       continue;
+
+      new_graphite_bb (scop, bb);
+      SET_BIT (visited, bb->index);
+
+      /* First push the blocks that have to be processed last.  Note
+        that this means that the order in which the code is organized
+        below is important: do not reorder the following code.  */
+      FOR_EACH_EDGE (e, ei, bb->succs)
+       if (! TEST_BIT (visited, e->dest->index)
+           && (int) loop_depth (e->dest->loop_father) < depth)
+         stack[sp++] = e->dest;
+
+      FOR_EACH_EDGE (e, ei, bb->succs)
+       if (! TEST_BIT (visited, e->dest->index)
+           && (int) loop_depth (e->dest->loop_father) == depth
+           && e->dest->loop_father->num != num)
+         stack[sp++] = e->dest;
+
+      FOR_EACH_EDGE (e, ei, bb->succs)
+       if (! TEST_BIT (visited, e->dest->index)
+           && (int) loop_depth (e->dest->loop_father) == depth
+           && e->dest->loop_father->num == num
+           && EDGE_COUNT (e->dest->preds) > 1)
+         stack[sp++] = e->dest;
+
+      FOR_EACH_EDGE (e, ei, bb->succs)
+       if (! TEST_BIT (visited, e->dest->index)
+           && (int) loop_depth (e->dest->loop_father) == depth
+           && e->dest->loop_father->num == num
+           && EDGE_COUNT (e->dest->preds) == 1)
+         stack[sp++] = e->dest;
+
+      FOR_EACH_EDGE (e, ei, bb->succs)
+       if (! TEST_BIT (visited, e->dest->index)
+           && (int) loop_depth (e->dest->loop_father) > depth)
+         stack[sp++] = e->dest;
+    }
+
+  free (stack);
+  sbitmap_free (visited);
+}
+
+
+/* Record LOOP as occuring in SCOP.  */
+
+static void
+scop_record_loop (scop_p scop, struct loop *loop)
+{
+  loop_p parent;
+  tree induction_var;
+
+  if (bitmap_bit_p (SCOP_LOOPS (scop), loop->num))
+    return;
+
+  parent = loop_outer (loop);
+  induction_var = find_induction_var_from_exit_cond (loop);
+
+  if (!bb_in_scop_p (parent->latch, scop))
+    parent = NULL;
+
+  if (induction_var != NULL_TREE)
+    {
+      name_tree oldiv = XNEW (struct name_tree);
+      oldiv->t = SSA_NAME_VAR (induction_var);
+      if (DECL_NAME (oldiv->t))
+       oldiv->name = IDENTIFIER_POINTER (DECL_NAME (oldiv->t));
+      else
+       {
+         char *n = XNEWVEC (char, 16);
+         sprintf (n, "D.%u", DECL_UID (oldiv->t));
+         oldiv->name = n;
+       }
+      oldiv->loop = loop;
+
+      VEC_safe_push (name_tree, heap, SCOP_OLDIVS (scop), oldiv);
+    }
+
+  bitmap_set_bit (SCOP_LOOPS (scop), loop->num);
+  VEC_safe_push (loop_p, heap, SCOP_LOOP_NEST (scop), loop);
+}
+
+/* Build the loop nests contained in SCOP.  */
+
+static void
+build_scop_loop_nests (scop_p scop)
+{
+  unsigned i;
+  graphite_bb_p gb;
+  struct loop *loop0, *loop1;
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+    {
+      struct loop *loop = gbb_loop (gb);
+
+      /* Only add loops, if they are completely contained in the SCoP.  */
+      if (loop->header == GBB_BB (gb)
+         && bb_in_scop_p (loop->latch, scop))
+        scop_record_loop (scop, gbb_loop (gb));
+    }
+
+  /* Make sure that the loops in the SCOP_LOOP_NEST are ordered.  It
+     can be the case that an inner loop is inserted before an outer
+     loop.  To avoid this, semi-sort once.  */
+  for (i = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), i, loop0); i++)
+    {
+      if (VEC_length (loop_p, SCOP_LOOP_NEST (scop)) == i + 1)
+       break;
+
+      loop1 = VEC_index (loop_p, SCOP_LOOP_NEST (scop), i + 1);
+      if (loop0->num > loop1->num)
+       {
+         VEC_replace (loop_p, SCOP_LOOP_NEST (scop), i, loop1);
+         VEC_replace (loop_p, SCOP_LOOP_NEST (scop), i + 1, loop0);
+       }
+    }
+}
+
+/* Calculate the number of loops around GB in the current SCOP.  */
+
+static inline int
+nb_loops_around_gb (graphite_bb_p gb)
+{
+  scop_p scop = GBB_SCOP (gb);
+  struct loop *l = gbb_loop (gb);
+  int d = 0;
+
+  for (; loop_in_scop_p (l, scop); d++, l = loop_outer (l));
+
+  return d;
+}
+
+/* Build for BB the static schedule.
+
+   The STATIC_SCHEDULE is defined like this:
+
+   A
+   for (i: ...)
+     {
+       for (j: ...)
+         {
+           B
+           C 
+         }
+
+       for (k: ...)
+         {
+           D
+           E 
+         }
+     }
+   F
+
+   Static schedules for A to F:
+
+     DEPTH
+     0 1 2 
+   A 0
+   B 1 0 0
+   C 1 0 1
+   D 1 1 0
+   E 1 1 1 
+   F 2
+*/
+
+static void
+build_scop_canonical_schedules (scop_p scop)
+{
+  int i, j;
+  graphite_bb_p gb;
+  int nb = scop_nb_loops (scop) + 1;
+
+  SCOP_STATIC_SCHEDULE (scop) = lambda_vector_new (nb);
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+    {
+      int offset = nb_loops_around_gb (gb);
+
+      /* After leaving a loop, it is possible that the schedule is not
+        set at zero.  This loop reinitializes components located
+        after OFFSET.  */
+
+      for (j = offset + 1; j < nb; j++)
+       if (SCOP_STATIC_SCHEDULE (scop)[j])
+         {
+           memset (&(SCOP_STATIC_SCHEDULE (scop)[j]), 0,
+                   sizeof (int) * (nb - j));
+           ++SCOP_STATIC_SCHEDULE (scop)[offset];
+           break;
+         }
+
+      GBB_STATIC_SCHEDULE (gb) = lambda_vector_new (offset + 1);
+      lambda_vector_copy (SCOP_STATIC_SCHEDULE (scop), 
+                         GBB_STATIC_SCHEDULE (gb), offset + 1);
+
+      ++SCOP_STATIC_SCHEDULE (scop)[offset];
+    }
+}
+
+/* Build the LOOPS vector for all bbs in SCOP.  */
+
+static void
+build_bb_loops (scop_p scop)
+{
+  graphite_bb_p gb;
+  int i;
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+    {
+      loop_p loop;
+      int depth; 
+
+      depth = nb_loops_around_gb (gb) - 1; 
+
+      GBB_LOOPS (gb) = VEC_alloc (loop_p, heap, 3);
+      VEC_safe_grow_cleared (loop_p, heap, GBB_LOOPS (gb), depth + 1);
+
+      loop = GBB_BB (gb)->loop_father;  
+
+      while (scop_contains_loop (scop, loop))
+        {
+          VEC_replace (loop_p, GBB_LOOPS (gb), depth, loop);
+          loop = loop_outer (loop);
+          depth--;
+        }
+    }
+}
+
+/* Get the index for parameter VAR in SCOP.  */
+
+static int
+param_index (tree var, scop_p scop)
+{
+  int i;
+  name_tree p;
+  name_tree nvar;
+
+  gcc_assert (TREE_CODE (var) == SSA_NAME);
+
+  for (i = 0; VEC_iterate (name_tree, SCOP_PARAMS (scop), i, p); i++)
+    if (p->t == var)
+      return i;
+
+  nvar = XNEW (struct name_tree);
+  nvar->t = var;
+  nvar->name = NULL;
+  VEC_safe_push (name_tree, heap, SCOP_PARAMS (scop), nvar);
+  return VEC_length (name_tree, SCOP_PARAMS (scop)) - 1;
+}
+
+/* Scan EXPR and translate it to an inequality vector INEQ that will
+   be added, or subtracted, in the constraint domain matrix C at row
+   R.  K is the number of columns for loop iterators in C. */ 
+
+static void
+scan_tree_for_params (scop_p s, tree e, CloogMatrix *c, int r, Value k,
+                     bool subtract)
+{
+  int cst_col, param_col;
+
+  if (e == chrec_dont_know)
+    return;
+
+  switch (TREE_CODE (e))
+    {
+    case POLYNOMIAL_CHREC:
+      {
+       tree left = CHREC_LEFT (e);
+       tree right = CHREC_RIGHT (e);
+       int var = CHREC_VARIABLE (e);
+
+       if (TREE_CODE (right) != INTEGER_CST)
+         return;
+
+       if (c)
+         {
+            int loop_col = scop_gimple_loop_depth (s, get_loop (var)) + 1;
+
+            if (subtract)
+              value_sub_int (c->p[r][loop_col], c->p[r][loop_col],
+                             int_cst_value (right));
+            else
+              value_add_int (c->p[r][loop_col], c->p[r][loop_col],
+                             int_cst_value (right));
+         }
+
+       switch (TREE_CODE (left))
+         {
+         case POLYNOMIAL_CHREC:
+           scan_tree_for_params (s, left, c, r, k, subtract);
+            return;
+
+         case INTEGER_CST:
+           /* Constant part.  */
+           if (c)
+             {
+                int v = int_cst_value (left);
+                cst_col = c->NbColumns - 1;
+
+                if (v < 0)
+                  {
+                    v = -v;
+                    subtract = subtract ? false : true;
+                  }
+
+                if (subtract)
+                  value_sub_int (c->p[r][cst_col], c->p[r][cst_col], v);
+                else
+                  value_add_int (c->p[r][cst_col], c->p[r][cst_col], v);
+             }
+           return;
+
+         default:
+           scan_tree_for_params (s, left, c, r, k, subtract);
+           return;
+         }
+      }
+      break;
+
+    case MULT_EXPR:
+      if (chrec_contains_symbols (TREE_OPERAND (e, 0)))
+       {
+         Value val;
+
+         gcc_assert (host_integerp (TREE_OPERAND (e, 1), 0));
+
+         value_init (val);
+         value_set_si (val, int_cst_value (TREE_OPERAND (e, 1)));
+         value_multiply (k, k, val);
+         value_clear (val);
+         scan_tree_for_params (s, TREE_OPERAND (e, 0), c, r, k, subtract);
+       }
+      else
+       {
+         Value val;
+
+         gcc_assert (host_integerp (TREE_OPERAND (e, 0), 0));
+
+         value_init (val);
+         value_set_si (val, int_cst_value (TREE_OPERAND (e, 0)));
+         value_multiply (k, k, val);
+         value_clear (val);
+         scan_tree_for_params (s, TREE_OPERAND (e, 1), c, r, k, subtract);
+       }
+      break;
+
+    case PLUS_EXPR:
+      scan_tree_for_params (s, TREE_OPERAND (e, 0), c, r, k, subtract);
+      scan_tree_for_params (s, TREE_OPERAND (e, 1), c, r, k, subtract);
+      break;
+
+    case MINUS_EXPR:
+      scan_tree_for_params (s, TREE_OPERAND (e, 0), c, r, k, subtract);
+      value_oppose (k, k);
+      scan_tree_for_params (s, TREE_OPERAND (e, 1), c, r, k, subtract);
+      break;
+
+    case NEGATE_EXPR:
+      value_oppose (k, k);
+      scan_tree_for_params (s, TREE_OPERAND (e, 0), c, r, k, subtract);
+      break;
+
+    case SSA_NAME:
+      param_col = param_index (e, s);
+
+      if (c)
+       {
+          param_col += c->NbColumns - scop_nb_params (s) - 1;
+
+          if (subtract)
+           value_subtract (c->p[r][param_col], c->p[r][param_col], k);
+          else
+           value_addto (c->p[r][param_col], c->p[r][param_col], k);
+       }
+      break;
+
+    case INTEGER_CST:
+      if (c)
+       {
+          int v = int_cst_value (e);
+         cst_col = c->NbColumns - 1;
+
+          if (v < 0)
+          {
+            v = -v;
+            subtract = subtract ? false : true;
+          }
+                
+          if (subtract)
+            value_sub_int (c->p[r][cst_col], c->p[r][cst_col], v); 
+          else
+            value_add_int (c->p[r][cst_col], c->p[r][cst_col], v);
+       }
+      break;
+
+    case NOP_EXPR:
+    case CONVERT_EXPR:
+    case NON_LVALUE_EXPR:
+      scan_tree_for_params (s, TREE_OPERAND (e, 0), c, r, k, subtract);
+      break;
+
+    default:
+      gcc_unreachable ();
+      break;
+    }
+}
+
+/* Data structure for idx_record_params.  */
+
+struct irp_data
+{
+  struct loop *loop;
+  scop_p scop;
+};
+
+/* For a data reference with an ARRAY_REF as its BASE, record the
+   parameters occurring in IDX.  DTA is passed in as complementary
+   information, and is used by the automatic walker function.  This
+   function is a callback for for_each_index.  */
+
+static bool
+idx_record_params (tree base, tree *idx, void *dta)
+{
+  struct irp_data *data = (struct irp_data *) dta;
+
+  if (TREE_CODE (base) != ARRAY_REF)
+    return true;
+
+  if (TREE_CODE (*idx) == SSA_NAME)
+    {
+      tree scev;
+      scop_p scop = data->scop;
+      struct loop *loop = data->loop;
+
+      scev = analyze_scalar_evolution (loop, *idx);
+      scev = instantiate_scev (outermost_loop_in_scop (scop, loop->header),
+                              loop, scev);
+
+      {
+       Value one;
+
+       value_init (one);
+       value_set_si (one, 1);
+       scan_tree_for_params (scop, scev, NULL, 0, one, false);
+       value_clear (one);
+      }
+    }
+
+  return true;
+}
+
+/* Find parameters with respect to SCOP in BB. We are looking in memory
+   access functions, conditions and loop bounds.  */
+
+static void
+find_params_in_bb (scop_p scop, basic_block bb)
+{
+  int i;
+  data_reference_p dr;
+  VEC (data_reference_p, heap) *drs;
+  gimple_stmt_iterator gsi;
+  struct loop *nest = outermost_loop_in_scop (scop, bb);
+
+  /* Find the parameters used in the memory access functions.  */
+  drs = VEC_alloc (data_reference_p, heap, 5);
+  for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+    find_data_references_in_stmt (nest, gsi_stmt (gsi), &drs);
+
+  for (i = 0; VEC_iterate (data_reference_p, drs, i, dr); i++)
+    {
+      struct irp_data irp;
+
+      irp.loop = bb->loop_father;
+      irp.scop = scop;
+      for_each_index (&dr->ref, idx_record_params, &irp);
+      free_data_ref (dr);
+    }
+
+  VEC_free (data_reference_p, heap, drs);
+
+  /* Find parameters in conditional statements.  */ 
+  gsi = gsi_last_bb (bb);
+  if (!gsi_end_p (gsi))
+    {
+      gimple stmt = gsi_stmt (gsi);
+
+      if (gimple_code (stmt) == GIMPLE_COND)
+        {
+          Value one;
+          loop_p loop = bb->loop_father;
+
+          tree lhs, rhs;
+          
+          lhs = gimple_cond_lhs (stmt);
+          lhs = analyze_scalar_evolution (loop, lhs);
+          lhs = instantiate_scev (nest, loop, lhs);
+
+          rhs = gimple_cond_rhs (stmt);
+          rhs = analyze_scalar_evolution (loop, rhs);
+          rhs = instantiate_scev (nest, loop, rhs);
+
+          value_init (one);
+          scan_tree_for_params (scop, lhs, NULL, 0, one, false);
+          value_set_si (one, 1);
+          scan_tree_for_params (scop, rhs, NULL, 0, one, false);
+          value_clear (one);
+       }
+    }
+}
+
+/* Saves in NV the name of variable P->T.  */
+
+static void
+save_var_name (char **nv, int i, name_tree p)
+{
+  const char *name = get_name (SSA_NAME_VAR (p->t));
+
+  if (name)
+    {
+      nv[i] = XNEWVEC (char, strlen (name) + 12);
+      sprintf (nv[i], "%s_%12d", name, SSA_NAME_VERSION (p->t));
+    }
+  else
+    {
+      nv[i] = XNEWVEC (char, 12);
+      sprintf (nv[i], "T_%12d", SSA_NAME_VERSION (p->t));
+    }
+
+  p->name = nv[i];
+}
+
+/* Return the maximal loop depth in SCOP.  */
+
+static int
+scop_max_loop_depth (scop_p scop)
+{
+  int i;
+  graphite_bb_p gbb;
+  int max_nb_loops = 0;
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gbb); i++) 
+    {    
+      int nb_loops = gbb_nb_loops (gbb);
+      if (max_nb_loops < nb_loops)
+        max_nb_loops = nb_loops;
+    }    
+
+  return max_nb_loops;
+}
+
+/* Initialize Cloog's parameter names from the names used in GIMPLE.
+   Initialize Cloog's iterator names, using 'graphite_iterator_%d'
+   from 0 to scop_nb_loops (scop).  */
+
+static void
+initialize_cloog_names (scop_p scop)
+{
+  int i, nb_params = VEC_length (name_tree, SCOP_PARAMS (scop));
+  char **params = XNEWVEC (char *, nb_params);
+  int nb_iterators = scop_max_loop_depth (scop);
+  int nb_scattering= cloog_program_nb_scattdims (SCOP_PROG (scop));
+  char **iterators = XNEWVEC (char *, nb_iterators * 2);
+  char **scattering = XNEWVEC (char *, nb_scattering);
+  name_tree p;
+
+  for (i = 0; VEC_iterate (name_tree, SCOP_PARAMS (scop), i, p); i++)
+    save_var_name (params, i, p);
+
+  cloog_names_set_nb_parameters (cloog_program_names (SCOP_PROG (scop)),
+                                nb_params);
+  cloog_names_set_parameters (cloog_program_names (SCOP_PROG (scop)),
+                             params);
+
+  for (i = 0; i < nb_iterators; i++)
+    {
+      iterators[i] = XNEWVEC (char, 18 + 12);
+      sprintf (iterators[i], "graphite_iterator_%d", i);
+    }
+
+  cloog_names_set_nb_iterators (cloog_program_names (SCOP_PROG (scop)),
+                               nb_iterators);
+  cloog_names_set_iterators (cloog_program_names (SCOP_PROG (scop)),
+                            iterators);
+
+  for (i = 0; i < nb_scattering; i++)
+    {
+      scattering[i] = XNEWVEC (char, 2 + 12);
+      sprintf (scattering[i], "s_%d", i);
+    }
+
+  cloog_names_set_nb_scattering (cloog_program_names (SCOP_PROG (scop)),
+                                nb_scattering);
+  cloog_names_set_scattering (cloog_program_names (SCOP_PROG (scop)),
+                             scattering);
+}
+
+/* Record the parameters used in the SCOP.  A variable is a parameter
+   in a scop if it does not vary during the execution of that scop.  */
+
+static void
+find_scop_parameters (scop_p scop)
+{
+  graphite_bb_p gb;
+  unsigned i;
+  struct loop *loop;
+  Value one;
+
+  value_init (one);
+  value_set_si (one, 1);
+
+  /* Find the parameters used in the loop bounds.  */
+  for (i = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), i, loop); i++)
+    {
+      tree nb_iters = number_of_latch_executions (loop);
+
+      if (!chrec_contains_symbols (nb_iters))
+       continue;
+
+      nb_iters = analyze_scalar_evolution (loop, nb_iters);
+      nb_iters = instantiate_scev (outermost_loop_in_scop (scop, loop->header),
+                                  loop, nb_iters);
+      scan_tree_for_params (scop, nb_iters, NULL, 0, one, false);
+    }
+
+  value_clear (one);
+
+  /* Find the parameters used in data accesses.  */
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+    find_params_in_bb (scop, GBB_BB (gb));
+}
+
+/* Build the context constraints for SCOP: constraints and relations
+   on parameters.  */
+
+static void
+build_scop_context (scop_p scop)
+{
+  int nb_params = scop_nb_params (scop);
+  CloogMatrix *matrix = cloog_matrix_alloc (1, nb_params + 2);
+
+  /* Insert '0 >= 0' in the context matrix, as it is not allowed to be
+     empty. */
+  value_set_si (matrix->p[0][0], 1);
+
+  value_set_si (matrix->p[0][nb_params + 1], 0);
+
+  cloog_program_set_context (SCOP_PROG (scop),
+                            cloog_domain_matrix2domain (matrix));
+  cloog_matrix_free (matrix);
+}
+
+/* Returns a graphite_bb from BB.  */
+
+static inline graphite_bb_p
+gbb_from_bb (basic_block bb)
+{
+  return (graphite_bb_p) bb->aux;
+}
+
+/* Add DOMAIN to all the basic blocks in LOOP.  */
+
+static void
+add_bb_domains (struct loop *loop, CloogMatrix *domain)
+{
+  basic_block *bbs = get_loop_body (loop);
+  unsigned i;
+
+  for (i = 0; i < loop->num_nodes; i++)
+    if (bbs[i]->loop_father == loop)
+      {
+        graphite_bb_p gbb = gbb_from_bb (bbs[i]);
+        GBB_DOMAIN (gbb) = cloog_matrix_copy (domain);
+      }
+
+  free (bbs);
+}
+
+/* Builds the constraint matrix for LOOP in SCOP.  NB_OUTER_LOOPS is the
+   number of loops surrounding LOOP in SCOP.  OUTER_CSTR gives the
+   constraints matrix for the surrounding loops.  */
+
+static void
+build_loop_iteration_domains (scop_p scop, struct loop *loop,
+                              CloogMatrix *outer_cstr, int nb_outer_loops)
+{
+  int i, j, row;
+  CloogMatrix *cstr;
+
+  int nb_rows = outer_cstr->NbRows + 1;
+  int nb_cols = outer_cstr->NbColumns + 1;
+
+  /* Last column of CSTR is the column of constants.  */
+  int cst_col = nb_cols - 1;
+
+  /* The column for the current loop is just after the columns of
+     other outer loops.  */
+  int loop_col = nb_outer_loops + 1;
+
+  tree nb_iters = number_of_latch_executions (loop);
+
+  /* When the number of iterations is a constant or a parameter, we
+     add a constraint for the upper bound of the loop.  So add a row
+     to the constraint matrix before allocating it.  */
+  if (TREE_CODE (nb_iters) == INTEGER_CST
+      || !chrec_contains_undetermined (nb_iters))
+    nb_rows++;
+
+  cstr = cloog_matrix_alloc (nb_rows, nb_cols);
+
+  /* Copy the outer constraints.  */
+  for (i = 0; i < outer_cstr->NbRows; i++)
+    {
+      /* Copy the eq/ineq and loops columns.  */
+      for (j = 0; j < loop_col; j++)
+        value_assign (cstr->p[i][j], outer_cstr->p[i][j]);
+
+      /* Leave an empty column in CSTR for the current loop, and then
+        copy the parameter columns.  */
+      for (j = loop_col; j < outer_cstr->NbColumns; j++)
+        value_assign (cstr->p[i][j + 1], outer_cstr->p[i][j]);
+    }
+
+  /* 0 <= loop_i */
+  row = outer_cstr->NbRows;
+  value_set_si (cstr->p[row][0], 1);
+  value_set_si (cstr->p[row][loop_col], 1);
+
+  /* loop_i <= nb_iters */
+  if (TREE_CODE (nb_iters) == INTEGER_CST)
+    {
+      row++;
+      value_set_si (cstr->p[row][0], 1);
+      value_set_si (cstr->p[row][loop_col], -1);
+
+      value_set_si (cstr->p[row][cst_col],
+                   int_cst_value (nb_iters));
+    }
+  else if (!chrec_contains_undetermined (nb_iters))
+    {
+      /* Otherwise nb_iters contains parameters: scan the nb_iters
+        expression and build its matrix representation.  */
+      Value one;
+
+      row++;
+      value_set_si (cstr->p[row][0], 1);
+      value_set_si (cstr->p[row][loop_col], -1);
+      nb_iters = analyze_scalar_evolution (loop, nb_iters);
+      nb_iters = 
+        instantiate_scev (outermost_loop_in_scop (scop, loop->header),
+                         loop, nb_iters);
+      value_init (one);
+      value_set_si (one, 1);
+      scan_tree_for_params (scop, nb_iters, cstr, row, one, false);
+      value_clear (one);
+    }
+  else
+    gcc_unreachable ();
+
+  if (loop->inner && loop_in_scop_p (loop->inner, scop))
+    build_loop_iteration_domains (scop, loop->inner, cstr, nb_outer_loops + 1);
+
+  /* Only go to the next loops, if we are not at the outermost layer.  These
+     have to be handled seperately, as we can be sure, that the chain at this
+     layer will be connected.  */
+  if (nb_outer_loops != 0 && loop->next && loop_in_scop_p (loop->next, scop))
+    build_loop_iteration_domains (scop, loop->next, outer_cstr, nb_outer_loops);
+
+  add_bb_domains (loop, cstr);
+
+  cloog_matrix_free (cstr);
+}
+
+/* Add conditions to the domain of GB.  */
+
+static void
+add_conditions_to_domain (graphite_bb_p gb)
+{
+  unsigned int i,j;
+  gimple stmt;
+  VEC (gimple, heap) *conditions = GBB_CONDITIONS (gb);
+  CloogMatrix *domain = GBB_DOMAIN (gb);
+  scop_p scop = GBB_SCOP (gb);
+
+  unsigned nb_rows;
+  unsigned nb_cols;
+  unsigned nb_new_rows = 0;
+  unsigned row;
+
+  if (VEC_empty (gimple, conditions))
+    return;
+
+  if (domain)
+    {
+      nb_rows = domain->NbRows;
+      nb_cols = domain->NbColumns;
+    }
+  else  
+    {
+      nb_rows = 0;
+      nb_cols = scop_nb_params (scop) + 2;
+    }
+
+  /* Count number of necessary new rows to add the conditions to the
+     domain.  */
+  for (i = 0; VEC_iterate (gimple, conditions, i, stmt); i++)
+    {
+      switch (gimple_code (stmt))
+        {
+        case GIMPLE_COND:
+          {
+            enum tree_code code = gimple_cond_code (stmt);
+
+            switch (code)
+              {
+              case NE_EXPR:
+              case EQ_EXPR:
+                /* NE and EQ statements are not supported right know. */
+                gcc_unreachable ();
+                break;
+              case LT_EXPR:
+              case GT_EXPR:
+              case LE_EXPR:
+              case GE_EXPR:
+                nb_new_rows++;
+                break;
+              default:
+                gcc_unreachable ();
+                break;
+              }
+          break;
+          }
+        case SWITCH_EXPR:
+          /* Switch statements are not supported right know.  */
+          gcc_unreachable ();
+          break;
+
+        default:
+          gcc_unreachable ();
+          break;
+        }
+    }
+
+
+  /* Enlarge the matrix.  */ 
+  { 
+    CloogMatrix *new_domain;
+    new_domain = cloog_matrix_alloc (nb_rows + nb_new_rows, nb_cols);
+
+    for (i = 0; i < nb_rows; i++)
+      for (j = 0; j < nb_cols; j++)
+          value_assign (new_domain->p[i][j], domain->p[i][j]);
+
+    cloog_matrix_free (domain);
+    domain = new_domain;
+    GBB_DOMAIN (gb) = new_domain;
+  }     
+
+  /* Add the conditions to the new enlarged domain matrix.  */
+  row = nb_rows;
+  for (i = 0; VEC_iterate (gimple, conditions, i, stmt); i++)
+    {
+      switch (gimple_code (stmt))
+        {
+        case GIMPLE_COND:
+          {
+            Value one;
+            enum tree_code code;
+            tree left;
+            tree right;
+            loop_p loop = GBB_BB (gb)->loop_father;
+            loop_p outermost = outermost_loop_in_scop (scop, GBB_BB (gb));
+
+            left = gimple_cond_lhs (stmt);
+            right = gimple_cond_rhs (stmt);
+
+            left = analyze_scalar_evolution (loop, left);
+            right = analyze_scalar_evolution (loop, right);
+            left = instantiate_scev (outermost, loop, left);
+            right = instantiate_scev (outermost, loop, right);
+
+            code = gimple_cond_code (stmt);
+
+            /* The conditions for ELSE-branches are inverted.  */
+            if (VEC_index (gimple, gb->condition_cases, i) == NULL)
+              code = invert_tree_comparison (code, false);
+
+            switch (code)
+              {
+              case NE_EXPR:
+                /* NE statements are not supported right know. */
+                gcc_unreachable ();
+                break;
+              case EQ_EXPR:
+                value_set_si (domain->p[row][0], 1);
+                value_init (one);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, left, domain, row, one, true);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, right, domain, row, one, false);
+                row++;
+                value_set_si (domain->p[row][0], 1);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, left, domain, row, one, false);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, right, domain, row, one, true);
+                value_clear (one);
+                row++;
+                break;
+              case LT_EXPR:
+                value_set_si (domain->p[row][0], 1);
+                value_init (one);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, left, domain, row, one, true);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, right, domain, row, one, false);
+                value_sub_int (domain->p[row][nb_cols - 1],
+                    domain->p[row][nb_cols - 1], 1); 
+                value_clear (one);
+                row++;
+                break;
+              case GT_EXPR:
+                value_set_si (domain->p[row][0], 1);
+                value_init (one);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, left, domain, row, one, false);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, right, domain, row, one, true);
+                value_sub_int (domain->p[row][nb_cols - 1],
+                    domain->p[row][nb_cols - 1], 1);
+                value_clear (one);
+                row++;
+                break;
+              case LE_EXPR:
+                value_set_si (domain->p[row][0], 1);
+                value_init (one);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, left, domain, row, one, true);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, right, domain, row, one, false);
+                value_clear (one);
+                row++;
+                break;
+              case GE_EXPR:
+                value_set_si (domain->p[row][0], 1);
+                value_init (one);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, left, domain, row, one, false);
+                value_set_si (one, 1);
+                scan_tree_for_params (scop, right, domain, row, one, true);
+                value_clear (one);
+                row++;
+                break;
+              default:
+                gcc_unreachable ();
+                break;
+              }
+            break;
+          }
+        case GIMPLE_SWITCH:
+          /* Switch statements are not supported right know.  */
+          gcc_unreachable ();
+          break;
+
+        default:
+          gcc_unreachable ();
+          break;
+        }
+    }
+}
+
+/* Helper recursive function.  */
+
+static void
+build_scop_conditions_1 (VEC (gimple, heap) **conditions,
+                        VEC (gimple, heap) **cases, basic_block bb,
+                        scop_p scop)
+{
+  int i, j;
+  graphite_bb_p gbb;
+  gimple_stmt_iterator gsi;
+  basic_block bb_child, bb_iter;
+  VEC (basic_block, heap) *dom;
+  
+  /* Make sure we are in the SCoP.  */
+  if (!bb_in_scop_p (bb, scop))
+    return;
+
+  /* Record conditions in graphite_bb.  */
+  gbb = gbb_from_bb (bb);
+  GBB_CONDITIONS (gbb) = VEC_copy (gimple, heap, *conditions);
+  GBB_CONDITION_CASES (gbb) = VEC_copy (gimple, heap, *cases);
+
+  add_conditions_to_domain (gbb);
+
+  dom = get_dominated_by (CDI_DOMINATORS, bb);
+
+  for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+    {
+      gimple stmt = gsi_stmt (gsi);
+      VEC (edge, gc) *edges;
+      edge e;
+
+      switch (gimple_code (stmt))
+       {
+       case GIMPLE_COND:
+         edges = bb->succs;
+         for (i = 0; VEC_iterate (edge, edges, i, e); i++)
+           if ((dominated_by_p (CDI_DOMINATORS, e->dest, bb))
+               && VEC_length (edge, e->dest->preds) == 1)
+             {
+               /* Remove the scanned block from the dominator successors.  */
+               for (j = 0; VEC_iterate (basic_block, dom, j, bb_iter); j++)
+                 if (bb_iter == e->dest)
+                   {
+                     VEC_unordered_remove (basic_block, dom, j);
+                     break;
+                   }
+
+               /* Recursively scan the then or else part.  */
+               if (e->flags & EDGE_TRUE_VALUE)
+                 VEC_safe_push (gimple, heap, *cases, stmt);
+               else if (e->flags & EDGE_FALSE_VALUE)
+                 VEC_safe_push (gimple, heap, *cases, NULL);
+               else
+                 gcc_unreachable ();
+
+               VEC_safe_push (gimple, heap, *conditions, stmt);
+               build_scop_conditions_1 (conditions, cases, e->dest, scop);
+               VEC_pop (gimple, *conditions);
+               VEC_pop (gimple, *cases);
+             }
+         break;
+
+       case GIMPLE_SWITCH:
+         {
+           unsigned i;
+           gimple_stmt_iterator gsi_search_gimple_label;
+
+           for (i = 0; i < gimple_switch_num_labels (stmt); ++i)
+             {
+               basic_block bb_iter;
+               size_t k;
+               size_t n_cases = VEC_length (gimple, *conditions);
+               unsigned n = gimple_switch_num_labels (stmt);
+
+               bb_child = label_to_block
+                 (CASE_LABEL (gimple_switch_label (stmt, i)));
+
+               /* Do not handle multiple values for the same block.  */
+               for (k = 0; k < n; k++)
+                 if (i != k
+                     && label_to_block 
+                     (CASE_LABEL (gimple_switch_label (stmt, k))) == bb_child)
+                   break;
+
+               if (k != n)
+                 continue;
+
+               /* Switch cases with more than one predecessor are not
+                  handled.  */
+               if (VEC_length (edge, bb_child->preds) != 1)
+                 continue;
+
+               /* Recursively scan the corresponding 'case' block.  */
+
+               for (gsi_search_gimple_label = gsi_start_bb (bb_child);
+                    !gsi_end_p (gsi_search_gimple_label);
+                    gsi_next (&gsi_search_gimple_label))
+                 {
+                   gimple stmt_gimple_label 
+                     = gsi_stmt (gsi_search_gimple_label);
+
+                   if (gimple_code (stmt_gimple_label) == GIMPLE_LABEL)
+                     {
+                       tree t = gimple_label_label (stmt_gimple_label);
+
+                       if (t == gimple_switch_label (stmt, i))
+                         VEC_replace (gimple, *cases, n_cases,
+                                      stmt_gimple_label);
+                       else
+                         gcc_unreachable ();
+                     }
+                 }
+
+               build_scop_conditions_1 (conditions, cases, bb_child, scop);
+
+               /* Remove the scanned block from the dominator successors.  */
+               for (j = 0; VEC_iterate (basic_block, dom, j, bb_iter); j++)
+                 if (bb_iter == bb_child)
+                   {
+                     VEC_unordered_remove (basic_block, dom, j);
+                     break;
+                   }  
+             }
+
+           VEC_pop (gimple, *conditions);
+           VEC_pop (gimple, *cases);
+           break;
+         }
+       default:
+         break;
+      }
+  }
+
+  /* Scan all immediate dominated successors.  */
+  for (i = 0; VEC_iterate (basic_block, dom, i, bb_child); i++)
+    build_scop_conditions_1 (conditions, cases, bb_child, scop);
+
+  VEC_free (basic_block, heap, dom);
+}
+
+/* Record all 'if' and 'switch' conditions in each gbb of SCOP.  */
+
+static void
+build_scop_conditions (scop_p scop)
+{
+  VEC (gimple, heap) *conditions = NULL;
+  VEC (gimple, heap) *cases = NULL;
+
+  build_scop_conditions_1 (&conditions, &cases, SCOP_ENTRY (scop), scop);
+
+  VEC_free (gimple, heap, conditions);
+  VEC_free (gimple, heap, cases);
+}
+
+/* Build the current domain matrix: the loops belonging to the current
+   SCOP, and that vary for the execution of the current basic block.
+   Returns false if there is no loop in SCOP.  */
+
+static bool
+build_scop_iteration_domain (scop_p scop)
+{
+  struct loop *loop;
+  CloogMatrix *outer_cstr;
+  int i;
+
+  /* Build cloog loop for all loops, that are in the uppermost loop layer of
+     this SCoP.  */
+  for (i = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), i, loop); i++)
+    if (!loop_in_scop_p (loop_outer (loop), scop))
+      {
+        /* The outermost constraints is a matrix that has:
+           -first column: eq/ineq boolean
+           -last column: a constant
+           -scop_nb_params columns for the parameters used in the scop.  */
+       outer_cstr = cloog_matrix_alloc (0, scop_nb_params (scop) + 2);
+       build_loop_iteration_domains (scop, loop, outer_cstr, 0);
+       cloog_matrix_free (outer_cstr);
+     }
+
+  return (i != 0);
+}
+
+/* Initializes an equation CY of the access matrix using the
+   information for a subscript from ACCESS_FUN, relatively to the loop
+   indexes from LOOP_NEST and parameter indexes from PARAMS.  NDIM is
+   the dimension of the array access, i.e. the number of
+   subscripts.  Returns true when the operation succeeds.  */
+
+static bool
+build_access_matrix_with_af (tree access_fun, lambda_vector cy,
+                            scop_p scop, int ndim)
+{
+  switch (TREE_CODE (access_fun))
+    {
+    case POLYNOMIAL_CHREC:
+      {
+       tree left = CHREC_LEFT (access_fun);
+       tree right = CHREC_RIGHT (access_fun);
+       int var;
+
+       if (TREE_CODE (right) != INTEGER_CST)
+         return false;
+        
+       var = loop_iteration_vector_dim (CHREC_VARIABLE (access_fun), scop);
+       cy[var] = int_cst_value (right);
+
+       switch (TREE_CODE (left))
+         {
+         case POLYNOMIAL_CHREC:
+           return build_access_matrix_with_af (left, cy, scop, ndim);
+
+         case INTEGER_CST:
+           cy[ndim - 1] = int_cst_value (left);
+           return true;
+
+         default:
+           /* FIXME: access_fn can have parameters.  */
+           return false;
+         }
+      }
+    case INTEGER_CST:
+      cy[ndim - 1] = int_cst_value (access_fun);
+      return true;
+
+    default:
+      /* FIXME: access_fn can have parameters.  */
+      return false;
+    }
+}
+
+/* Initialize the access matrix in the data reference REF with respect
+   to the loop nesting LOOP_NEST.  Return true when the operation
+   succeeded.  */
+
+static bool
+build_access_matrix (data_reference_p ref, graphite_bb_p gb)
+{
+  int i, ndim = DR_NUM_DIMENSIONS (ref);
+  struct access_matrix *am = GGC_NEW (struct access_matrix);
+
+  AM_MATRIX (am) = VEC_alloc (lambda_vector, heap, ndim);
+  DR_SCOP (ref) = GBB_SCOP (gb);
+
+  for (i = 0; i < ndim; i++)
+    {
+      lambda_vector v = lambda_vector_new (ref_nb_loops (ref));
+      scop_p scop = GBB_SCOP (gb);
+      tree af = DR_ACCESS_FN (ref, i);
+
+      if (!build_access_matrix_with_af (af, v, scop, ref_nb_loops (ref)))
+       return false;
+
+      VEC_safe_push (lambda_vector, heap, AM_MATRIX (am), v);
+    }
+
+  DR_ACCESS_MATRIX (ref) = am;
+  return true;
+}
+
+/* Build the access matrices for the data references in the SCOP.  */
+
+static void
+build_scop_data_accesses (scop_p scop)
+{
+  int i;
+  graphite_bb_p gb;
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++)
+    {
+      int j;
+      gimple_stmt_iterator gsi;
+      data_reference_p dr;
+      struct loop *nest = outermost_loop_in_scop (scop, GBB_BB (gb));
+
+      /* On each statement of the basic block, gather all the occurences
+        to read/write memory.  */
+      GBB_DATA_REFS (gb) = VEC_alloc (data_reference_p, heap, 5);
+      for (gsi = gsi_start_bb (GBB_BB (gb)); !gsi_end_p (gsi); gsi_next (&gsi))
+       find_data_references_in_stmt (nest, gsi_stmt (gsi),
+                                     &GBB_DATA_REFS (gb));
+
+      /* FIXME: Construction of access matrix is disabled until some
+        pass, like the data dependence analysis, is using it.  */
+      continue;
+
+      /* Construct the access matrix for each data ref, with respect to
+        the loop nest of the current BB in the considered SCOP.  */
+      for (j = 0;
+          VEC_iterate (data_reference_p, GBB_DATA_REFS (gb), j, dr);
+          j++)
+       {
+         bool res = build_access_matrix (dr, gb);
+
+         /* FIXME: At this point the DRs should always have an affine
+            form.  For the moment this fails as build_access_matrix
+            does not build matrices with parameters.  */
+         gcc_assert (res);
+       }
+    }
+}
+
+/* Converts a GMP constant value to a tree and returns it.  */
+
+static tree
+gmp_cst_to_tree (Value v)
+{
+  return build_int_cst (integer_type_node, value_get_si (v));
+}
+
+/* Returns the tree variable from the name NAME that was given in
+   Cloog representation.  All the parameters are stored in PARAMS, and
+   all the loop induction variables are stored in IVSTACK.
+
+   FIXME: This is a hack, and Cloog should be fixed to not work with
+   variable names represented as "char *string", but with void
+   pointers that could be casted back to a tree.  The only problem in
+   doing that is that Cloog's pretty printer still assumes that
+   variable names are char *strings.  The solution would be to have a
+   function pointer for pretty-printing that can be redirected to be
+   print_generic_stmt in our case, or fprintf by default.
+   ???  Too ugly to live.  */
+
+static tree
+clast_name_to_gcc (const char *name, VEC (name_tree, heap) *params, 
+                  loop_iv_stack ivstack)
+{
+  int i;
+  name_tree t;
+  tree iv;
+
+  for (i = 0; VEC_iterate (name_tree, params, i, t); i++)
+    if (!strcmp (name, t->name))
+      return t->t;
+
+  iv = loop_iv_stack_get_iv_from_name (ivstack, name);
+  if (iv)
+    return iv;
+
+  gcc_unreachable ();
+}
+
+/* Converts a Cloog AST expression E back to a GCC expression tree.   */
+
+static tree
+clast_to_gcc_expression (struct clast_expr *e,
+                        VEC (name_tree, heap) *params,
+                        loop_iv_stack ivstack)
+{
+  tree type = integer_type_node;
+
+  gcc_assert (e);
+
+  switch (e->type)
+    {
+    case expr_term:
+      {
+       struct clast_term *t = (struct clast_term *) e;
+
+       if (t->var)
+         {
+           if (value_one_p (t->val))
+             return clast_name_to_gcc (t->var, params, ivstack);
+
+           else if (value_mone_p (t->val))
+             return fold_build1 (NEGATE_EXPR, type,
+                                 clast_name_to_gcc (t->var, params, ivstack));
+           else
+             return fold_build2 (MULT_EXPR, type,
+                                 gmp_cst_to_tree (t->val),
+                                 clast_name_to_gcc (t->var, params, ivstack));
+         }
+       else
+         return gmp_cst_to_tree (t->val);
+      }
+
+    case expr_red:
+      {
+        struct clast_reduction *r = (struct clast_reduction *) e;
+        tree left, right;
+
+        switch (r->type)
+          {
+         case clast_red_sum:
+           if (r->n == 1)
+             return clast_to_gcc_expression (r->elts[0], params, ivstack);
+
+           else 
+             {
+               gcc_assert (r->n >= 1
+                           && r->elts[0]->type == expr_term
+                           && r->elts[1]->type == expr_term);
+
+               left = clast_to_gcc_expression (r->elts[0], params, ivstack);
+               right = clast_to_gcc_expression (r->elts[1], params, ivstack);
+               return fold_build2 (PLUS_EXPR, type, left, right);
+             }
+
+           break;
+
+         case clast_red_min:
+           if (r->n == 1)
+             return clast_to_gcc_expression (r->elts[0], params, ivstack);
+
+           else if (r->n == 2)
+             {
+               left = clast_to_gcc_expression (r->elts[0], params, ivstack);
+               right = clast_to_gcc_expression (r->elts[1], params, ivstack);
+               return fold_build2 (MIN_EXPR, type, left, right);
+             }
+
+           else
+             gcc_unreachable();
+
+           break;
+
+         case clast_red_max:
+           if (r->n == 1)
+             return clast_to_gcc_expression (r->elts[0], params, ivstack);
+
+           else if (r->n == 2)
+             {
+               left = clast_to_gcc_expression (r->elts[0], params, ivstack);
+               right = clast_to_gcc_expression (r->elts[1], params, ivstack);
+               return fold_build2 (MAX_EXPR, type, left, right);
+             }
+
+           else
+             gcc_unreachable();
+
+           break;
+
+         default:
+           gcc_unreachable ();
+          }
+        break;
+      }
+
+    case expr_bin:
+      {
+       struct clast_binary *b = (struct clast_binary *) e;
+       struct clast_expr *lhs = (struct clast_expr *) b->LHS;
+       struct clast_expr *rhs = (struct clast_expr *) b->RHS;
+       tree tl = clast_to_gcc_expression (lhs, params, ivstack);
+
+       /* FIXME: The next statement produces a warning: Cloog assumes
+          that the RHS is a constant, but this is a "void *" pointer
+          that should be casted into a Value, but this cast cannot be
+          done as Value is a GMP type, that is an array.  Cloog must
+          be fixed for removing this warning.  */
+       tree tr = gmp_cst_to_tree (rhs);
+
+       switch (b->type)
+         {
+         case clast_bin_fdiv:
+           return fold_build2 (FLOOR_DIV_EXPR, type, tl, tr);
+
+         case clast_bin_cdiv:
+           return fold_build2 (CEIL_DIV_EXPR, type, tl, tr);
+
+         case clast_bin_div:
+           return fold_build2 (EXACT_DIV_EXPR, type, tl, tr);
+
+         case clast_bin_mod:
+           return fold_build2 (TRUNC_MOD_EXPR, type, tl, tr);
+
+         default:
+           gcc_unreachable ();
+         }
+      }
+
+    default:
+      gcc_unreachable ();
+    }
+
+  return NULL_TREE;
+}
+
+/* Translates a clast equation CLEQ to a tree.  */
+
+static tree
+graphite_translate_clast_equation (scop_p scop,
+                                  struct clast_equation *cleq,
+                                  loop_iv_stack ivstack)
+{
+  enum tree_code comp;
+  tree lhs = clast_to_gcc_expression (cleq->LHS, SCOP_PARAMS (scop), ivstack);
+  tree rhs = clast_to_gcc_expression (cleq->RHS, SCOP_PARAMS (scop), ivstack);
+
+  if (cleq->sign == 0)
+    comp = EQ_EXPR;
+
+  else if (cleq->sign > 0)
+    comp = GE_EXPR;
+
+  else
+    comp = LE_EXPR;
+
+  return fold_build2 (comp, integer_type_node, lhs, rhs);
+}
+
+/* Creates the test for the condition in STMT.  */
+
+static tree
+graphite_create_guard_cond_expr (scop_p scop, struct clast_guard *stmt, 
+                                loop_iv_stack ivstack)
+{
+  tree cond = NULL;
+  int i;
+
+  for (i = 0; i < stmt->n; i++)
+    {
+      tree eq = graphite_translate_clast_equation (scop, &stmt->eq[i], ivstack);
+
+      if (cond)
+       cond = fold_build2 (TRUTH_AND_EXPR, integer_type_node, cond, eq);
+      else
+       cond = eq;
+    }
+
+  return cond;
+}
+
+/* Creates a new if region corresponding to Cloog's guard.  */
+
+static edge 
+graphite_create_new_guard (scop_p scop, edge entry_edge,
+                          struct clast_guard *stmt, 
+                          loop_iv_stack ivstack)
+{
+  tree cond_expr = graphite_create_guard_cond_expr (scop, stmt, ivstack);
+  edge exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr);
+  return exit_edge;
+}
+
+
+/* Creates a new LOOP corresponding to Cloog's STMT.  Inserts an induction 
+   variable for the new LOOP.  New LOOP is attached to CFG starting at
+   ENTRY_EDGE.  LOOP is inserted into the loop tree and becomes the child
+   loop of the OUTER_LOOP.  */
+
+static struct loop *
+graphite_create_new_loop (scop_p scop, edge entry_edge,
+                         struct clast_for *stmt, loop_iv_stack ivstack,
+                         loop_p outer)
+{
+  struct loop *loop;
+  tree ivvar;
+  tree stride, lowb, upb;
+  tree iv_before;
+
+  gcc_assert (stmt->LB
+             && stmt->UB);
+
+  stride = gmp_cst_to_tree (stmt->stride);
+  lowb = clast_to_gcc_expression (stmt->LB, SCOP_PARAMS (scop), ivstack);
+  ivvar = create_tmp_var (integer_type_node, "graphiteIV");
+  add_referenced_var (ivvar);
+
+  upb = clast_to_gcc_expression (stmt->UB, SCOP_PARAMS (scop), ivstack);
+  loop = create_empty_loop_on_edge (entry_edge, lowb, stride, upb, ivvar,
+                                   &iv_before, outer ? outer
+                                   : entry_edge->src->loop_father);
+
+  loop_iv_stack_push (ivstack, iv_before, stmt->iterator);
+
+  return loop;
+}
+
+/* Remove all the edges from EDGES except the edge KEEP.  */
+
+static void
+remove_all_edges_1 (VEC (edge, gc) *edges, edge keep)
+{
+  edge e;
+  edge_iterator ei;
+
+  for (ei = ei_start (edges); (e = ei_safe_edge (ei)); )
+    {
+      if (e != keep)
+       {
+         remove_edge (e);
+         e = ei_safe_edge (ei);
+       }
+      else
+       ei_next (&ei);
+    }
+}
+
+/* Remove all the edges from BB except the edge KEEP.  */
+
+static void
+remove_all_edges (basic_block bb, edge keep)
+{
+  remove_all_edges_1 (bb->succs, keep);
+  remove_all_edges_1 (bb->preds, keep);
+}
+
+/* Rename the SSA_NAMEs used in STMT and that appear in IVSTACK.  */
+
+static void 
+graphite_rename_ivs_stmt (gimple stmt, graphite_bb_p gbb, scop_p scop,
+                         loop_p old, loop_iv_stack ivstack)
+{
+  ssa_op_iter iter;
+  use_operand_p use_p;
+
+  FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
+    {
+      tree use = USE_FROM_PTR (use_p);
+      tree new_iv = NULL;
+      name_tree old_iv = get_old_iv_from_ssa_name (scop, old, use);
+      
+      if (old_iv)
+       new_iv = loop_iv_stack_get_iv (ivstack,
+                                      gbb_loop_index (gbb, old_iv->loop));
+
+      if (new_iv)
+       SET_USE (use_p, new_iv);
+    }
+}
+
+/* Returns true if SSA_NAME is a parameter of SCOP.  */
+
+static bool
+is_parameter (scop_p scop, tree ssa_name)
+{
+  int i;
+  VEC (name_tree, heap) *params = SCOP_PARAMS (scop);
+  name_tree param;
+
+  for (i = 0; VEC_iterate (name_tree, params, i, param); i++)
+    if (param->t == ssa_name)
+      return true;
+
+  return false;
+}
+
+/* Returns true if NAME is an old induction variable in SCOP.  OLD is
+   the original loop that contained the definition of NAME.  */
+
+static bool
+is_old_iv (scop_p scop, loop_p old, tree name)
+{
+  return get_old_iv_from_ssa_name (scop, old, name) != NULL;
+
+}
+
+static void expand_scalar_variables_stmt (gimple, graphite_bb_p, scop_p, loop_p,
+                                         loop_iv_stack);
+
+/* Constructs a tree which only contains old_ivs and parameters.  Any
+   other variables that are defined outside GBB will be eliminated by
+   using their definitions in the constructed tree.  OLD_LOOP_FATHER
+   is the original loop that contained GBB.  */
+
+static tree
+expand_scalar_variables_expr (tree type, tree op0, enum tree_code code, 
+                             tree op1, graphite_bb_p gbb, scop_p scop, 
+                             loop_p old_loop_father, loop_iv_stack ivstack)
+{
+  if (TREE_CODE_CLASS (code) == tcc_constant
+      && code == INTEGER_CST)
+      return op0;
+
+  if (TREE_CODE_CLASS (code) == tcc_unary)
+    {
+      tree op0_type = TREE_TYPE (op0);
+      enum tree_code op0_code = TREE_CODE (op0);
+      tree op0_expr = 
+       expand_scalar_variables_expr (op0_type, op0, op0_code,
+                                     NULL, gbb, scop, old_loop_father,
+                                     ivstack);
+
+      return fold_build1 (code, type, op0_expr);
+    }
+
+  if (TREE_CODE_CLASS (code) == tcc_binary)
+    {
+      tree op0_type = TREE_TYPE (op0);
+      enum tree_code op0_code = TREE_CODE (op0);
+      tree op0_expr = 
+       expand_scalar_variables_expr (op0_type, op0, op0_code,
+                                     NULL, gbb, scop, old_loop_father,
+                                     ivstack);
+      tree op1_type = TREE_TYPE (op1);
+      enum tree_code op1_code = TREE_CODE (op1);
+      tree op1_expr = 
+       expand_scalar_variables_expr (op1_type, op1, op1_code,
+                                     NULL, gbb, scop, old_loop_father,
+                                     ivstack);
+
+      return fold_build2 (code, type, op0_expr, op1_expr);
+    }
+
+  if (code == SSA_NAME)
+    {
+      tree var0, var1;
+      gimple def_stmt;
+      enum tree_code subcode;
+      
+      if(is_parameter (scop, op0) ||
+        is_old_iv (scop, old_loop_father, op0))
+       return op0;
+      
+      def_stmt = SSA_NAME_DEF_STMT (op0);
+      
+      if (gimple_bb (def_stmt) == GBB_BB (gbb))
+       {
+         /* If the defining statement is in the basic block already
+            we do not need to create a new expression for it, we
+            only need to ensure its operands are expanded.  */
+         expand_scalar_variables_stmt (def_stmt, gbb, scop,
+                                       old_loop_father, ivstack);
+         return op0;
+         
+       }
+      else
+       {
+         if (gimple_code (def_stmt) != GIMPLE_ASSIGN)
+           return op0;
+         
+         var0 = gimple_assign_rhs1 (def_stmt);
+         subcode = gimple_assign_rhs_code (def_stmt);
+         var1 = gimple_assign_rhs2 (def_stmt);
+         
+         return expand_scalar_variables_expr (type, var0, subcode, var1, 
+                                              gbb, scop, old_loop_father, 
+                                              ivstack);
+       }
+    }
+
+  gcc_unreachable ();
+  return NULL;
+}
+
+/* Replicates any uses of non-parameters and non-old-ivs variablesthat
+   are defind outside GBB with code that is inserted in GBB.
+   OLD_LOOP_FATHER is the original loop that contained STMT.  */
+static void
+expand_scalar_variables_stmt (gimple stmt, graphite_bb_p gbb, scop_p scop,
+                             loop_p old_loop_father, loop_iv_stack ivstack)
+{
+  ssa_op_iter iter;
+  use_operand_p use_p;
+  basic_block bb = GBB_BB (gbb);
+
+  FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
+    {
+      tree use = USE_FROM_PTR (use_p);
+      tree type = TREE_TYPE (use);
+      enum tree_code code  = TREE_CODE (use);
+      tree use_expr = expand_scalar_variables_expr (type, use, code, NULL,
+                                                   gbb, scop, old_loop_father, 
+                                                   ivstack);
+      if (use_expr != use)
+       {
+         gimple_stmt_iterator gsi = gsi_after_labels (bb);
+         tree new_use =
+           force_gimple_operand_gsi (&gsi, use_expr, true, NULL,
+                                     true, GSI_NEW_STMT);
+         SET_USE (use_p, new_use);
+       }
+    }
+}
+
+/* Copies the definitions outside of GBB of variables that are not
+   induction variables nor parameters. GBB must only contain
+   "external" references to these types of variables.  OLD_LOOP_FATHER
+   is the original loop that contained GBB.  */
+
+static void 
+expand_scalar_variables (graphite_bb_p gbb, scop_p scop, 
+                        loop_p old_loop_father, loop_iv_stack ivstack)
+{
+  basic_block bb = GBB_BB (gbb);
+  gimple_stmt_iterator gsi;
+  
+  for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi);)
+    {
+      gimple stmt = gsi_stmt (gsi);
+      expand_scalar_variables_stmt (stmt, gbb, scop, old_loop_father, 
+                                   ivstack); 
+      gsi_next (&gsi);
+    }
+}
+
+/* Rename all the SSA_NAMEs from block GBB that appear in IVSTACK in
+   terms of new induction variables.  OLD_LOOP_FATHER is the original
+   loop that contained GBB.  */
+
+static void 
+graphite_rename_ivs (graphite_bb_p gbb, scop_p scop, loop_p old_loop_father,
+                    loop_iv_stack ivstack)
+{
+  basic_block bb = GBB_BB (gbb);
+  gimple_stmt_iterator gsi;
+  
+  for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi);)
+    {
+      gimple stmt = gsi_stmt (gsi);
+
+      if (gimple_get_lhs (stmt)
+         && TREE_CODE (gimple_get_lhs (stmt)) == SSA_NAME
+         && get_old_iv_from_ssa_name (scop, old_loop_father,
+                                      gimple_get_lhs (stmt)))
+       gsi_remove (&gsi, false);
+      else
+       {
+         graphite_rename_ivs_stmt (stmt, gbb, scop, old_loop_father, ivstack); 
+         gsi_next (&gsi);
+       }
+    }
+}
+
+/* Move all the PHI nodes from block FROM to block TO.
+   OLD_LOOP_FATHER is the original loop that contained FROM.  */
+
+static void
+move_phi_nodes (scop_p scop, loop_p old_loop_father, basic_block from,
+               basic_block to)
+{
+  gimple_stmt_iterator gsi;
+
+  for (gsi = gsi_start_phis (from); !gsi_end_p (gsi);)
+    {
+      gimple phi = gsi_stmt (gsi);
+      tree op = gimple_phi_result (phi);
+
+      if (get_old_iv_from_ssa_name (scop, old_loop_father, op) == NULL)
+       {
+         gimple new_phi = make_phi_node (op, 0);
+         add_phi_node_to_bb (new_phi, to);
+       }
+      remove_phi_node (&gsi, false);
+    }
+}
+
+/* Remove condition from BB.  */
+
+static void
+remove_condition (basic_block bb)
+{
+  gimple last = last_stmt (bb);
+
+  if (last && gimple_code (last) == GIMPLE_COND)
+    {
+      gimple_stmt_iterator gsi = gsi_last_bb (bb);
+      gsi_remove (&gsi, true);
+    }
+}
+
+/* Returns the first successor edge of BB with EDGE_TRUE_VALUE flag set.  */
+
+static edge
+get_true_edge_from_guard_bb (basic_block bb)
+{
+  edge e;
+  edge_iterator ei;
+
+  FOR_EACH_EDGE (e, ei, bb->succs)
+    if (e->flags & EDGE_TRUE_VALUE) 
+      return e;
+
+  gcc_unreachable ();
+  return NULL;
+}
+
+/* Translates a CLAST statement STMT to GCC representation.  NEXT_E is
+   the edge where new generated code should be attached.  BB_EXIT is the last
+   basic block that defines the scope of code generation.  CONTEXT_LOOP is the
+   loop in which the generated code will be placed (might be NULL).  */
+
+static edge
+translate_clast (scop_p scop, struct loop *context_loop,
+                struct clast_stmt *stmt, edge next_e, loop_iv_stack ivstack)
+{
+  if (!stmt)
+    return next_e;
+
+  if (CLAST_STMT_IS_A (stmt, stmt_root))
+    return translate_clast (scop, context_loop, stmt->next, next_e, ivstack);
+
+  if (CLAST_STMT_IS_A (stmt, stmt_user))
+    {
+      CloogStatement *cs = ((struct clast_user_stmt *) stmt)->statement;
+      graphite_bb_p gbb = (graphite_bb_p) cloog_statement_usr (cs);
+      basic_block bb = gbb->bb;
+      loop_p old_loop_father = bb->loop_father;
+
+      if (bb == ENTRY_BLOCK_PTR)
+       return next_e;
+
+      remove_condition (bb);
+      expand_scalar_variables (gbb, scop, old_loop_father, ivstack);
+      remove_all_edges (bb, next_e);
+      move_phi_nodes (scop, old_loop_father, bb, next_e->src); 
+      redirect_edge_succ_nodup (next_e, bb);
+
+      if (context_loop)
+       {
+         remove_bb_from_loops (bb);
+         add_bb_to_loop (bb, context_loop);
+       }
+
+      set_immediate_dominator (CDI_DOMINATORS, next_e->dest, next_e->src); 
+      mark_virtual_ops_in_bb (bb);
+      next_e = make_edge (bb,
+                         context_loop ? context_loop->latch : EXIT_BLOCK_PTR,
+                         EDGE_FALLTHRU);;
+      graphite_rename_ivs (gbb, scop, old_loop_father, ivstack);
+      return translate_clast (scop, context_loop, stmt->next, next_e, ivstack);
+    }
+
+  if (CLAST_STMT_IS_A (stmt, stmt_for))
+    {
+      struct loop *loop
+       = graphite_create_new_loop (scop, next_e, (struct clast_for *) stmt,
+                                   ivstack, context_loop ? context_loop
+                                   : get_loop (0));
+      edge last_e = single_exit (loop);
+       
+      next_e = translate_clast (scop, loop, ((struct clast_for *) stmt)->body,
+                               single_pred_edge (loop->latch), ivstack);
+      redirect_edge_succ_nodup (next_e, loop->latch);
+       
+      set_immediate_dominator (CDI_DOMINATORS, next_e->dest, next_e->src);
+      loop_iv_stack_pop (ivstack);
+
+      return translate_clast (scop, context_loop, stmt->next, last_e, ivstack);
+    }
+
+  if (CLAST_STMT_IS_A (stmt, stmt_guard))
+    {
+      edge last_e = graphite_create_new_guard (scop, next_e,
+                                              ((struct clast_guard *) stmt),
+                                              ivstack);
+      edge true_e = get_true_edge_from_guard_bb (next_e->dest);
+      next_e = translate_clast (scop, context_loop, 
+                               ((struct clast_guard *) stmt)->then,
+                               true_e, ivstack);
+      redirect_edge_succ_nodup (next_e, last_e->src);
+      return translate_clast (scop, context_loop, stmt->next, last_e, ivstack);
+    }
+
+  if (CLAST_STMT_IS_A (stmt, stmt_block))
+    {
+      next_e = translate_clast (scop, context_loop,
+                               ((struct clast_block *) stmt)->body,
+                               next_e, ivstack);
+      return translate_clast (scop, context_loop, stmt->next, next_e, ivstack);
+    }
+
+  gcc_unreachable ();
+}
+
+/* Build cloog program for SCoP.  */
+
+static void
+build_cloog_prog (scop_p scop)
+{
+  int i;
+  int max_nb_loops = scop_max_loop_depth (scop);
+  graphite_bb_p gbb;
+  CloogLoop *loop_list = NULL;
+  CloogBlockList *block_list = NULL;
+  CloogDomainList *scattering = NULL;
+  CloogProgram *prog = SCOP_PROG (scop);
+  int nbs = 2 * max_nb_loops + 1;
+  int *scaldims = (int *) xmalloc (nbs * (sizeof (int)));
+
+  cloog_program_set_nb_scattdims (prog, nbs);
+  initialize_cloog_names (scop);
+
+  for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gbb); i++)
+    {
+      /* Build new block.  */
+      CloogMatrix *domain = GBB_DOMAIN (gbb);
+      CloogStatement *stmt = cloog_statement_alloc (GBB_BB (gbb)->index);
+      CloogBlock *block = cloog_block_alloc (stmt, 0, NULL,
+                                            nb_loops_around_gb (gbb));
+      cloog_statement_set_usr (stmt, gbb);
+
+      /* Add empty domain to all bbs, which do not yet have a domain, as they
+         are not part of any loop.  */
+      if (domain == NULL)
+       {
+          domain = cloog_matrix_alloc (0, scop_nb_params (scop) + 2);
+          GBB_DOMAIN (gbb) = domain;
+       }
+
+      /* Build loop list.  */
+      {
+        CloogLoop *new_loop_list = cloog_loop_malloc ();
+        cloog_loop_set_next (new_loop_list, loop_list);
+        cloog_loop_set_domain (new_loop_list,
+                              cloog_domain_matrix2domain (domain));
+        cloog_loop_set_block (new_loop_list, block);
+        loop_list = new_loop_list;
+      }
+
+      /* Build block list.  */
+      {
+        CloogBlockList *new_block_list = cloog_block_list_malloc ();
+
+        cloog_block_list_set_next (new_block_list, block_list);
+        cloog_block_list_set_block (new_block_list, block);
+        block_list = new_block_list;
+      }
+
+      /* Build scattering list.  */
+      {
+        /* XXX: Replace with cloog_domain_list_alloc(), when available.  */
+        CloogDomainList *new_scattering
+         = (CloogDomainList *) xmalloc (sizeof (CloogDomainList));
+        CloogMatrix *scat_mat = schedule_to_scattering (gbb, nbs);
+
+        cloog_set_next_domain (new_scattering, scattering);
+        cloog_set_domain (new_scattering,
+                         cloog_domain_matrix2domain (scat_mat));
+        scattering = new_scattering;
+        cloog_matrix_free (scat_mat);
+      }
+    }
+
+  cloog_program_set_loop (prog, loop_list);
+  cloog_program_set_blocklist (prog, block_list);
+
+  for (i = 0; i < nbs; i++)
+    scaldims[i] = 0 ;
+
+  cloog_program_set_scaldims (prog, scaldims);
+
+  /* Extract scalar dimensions to&nbs