+2014-08-18 Roman Gareev <gareevroman@gmail.com>
+
+ * configure.ac: Eliminate ClooG installation dependency.
+ * configure: Regenerate.
+ * Makefile.tpl: Add definition of ISLLIBS and HOST_ISLLIBS.
+ * Makefile.in: Regenerate.
+
2014-08-15 Ilya Verbin <iverbin@gmail.com>
* MAINTAINERS (Write After Approval): Add myself.
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
HOST_GMPINC = @gmpinc@
# Where to find ISL
+HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
# Where to find CLOOG
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
HOST_GMPINC = @gmpinc@
# Where to find ISL
+HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
# Where to find CLOOG
+2014-08-18 Roman Gareev <gareevroman@gmail.com>
+
+ * cloog.m4: Remove the path to isllibs from clooglibs.
+ * isl.m4: Add paths to islinc, isllibs.
+
2014-07-26 Uros Bizjak <ubizjak@gmail.com>
PR target/47230
fi
clooginc="-DCLOOG_INT_GMP ${clooginc}"
- clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
+ clooglibs="${clooglibs} -lcloog-isl"
]
)
ENABLE_ISL_CHECK=no
AC_MSG_WARN([using in-tree ISL, disabling version check])
fi
+
+ islinc="-DCLOOG_INT_GMP ${islinc}"
+ isllibs="${isllibs} -lisl"
]
)
clooginc
clooglibs
islinc
+isllibs
poststage1_ldflags
poststage1_libs
stage1_ldflags
build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
-#
+#f
host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv"
# these tools are built for the host environment
fi
-# Treat either --without-cloog or --without-isl as a request to disable
+# Treat --without-isl as a request to disable
# GRAPHITE support and skip all following checks.
-if test "x$with_isl" != "xno" &&
- test "x$with_cloog" != "xno"; then
+if test "x$with_isl" != "xno"; then
# Check for ISL
$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
fi
+ islinc="-DCLOOG_INT_GMP ${islinc}"
+ isllibs="${isllibs} -lisl"
+
if test "${ENABLE_ISL_CHECK}" = yes ; then
fi
clooginc="-DCLOOG_INT_GMP ${clooginc}"
- clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
+ clooglibs="${clooglibs} -lcloog-isl"
fi
fi
-# If either the ISL or the CLooG check failed, disable builds of in-tree
-# variants of both
+# If the ISL check failed, disable builds of in-tree
+# variants of both ISL and CLooG
if test "x$with_isl" = xno ||
- test "x$with_cloog" = xno ||
- test "x$gcc_cv_cloog" = xno ||
test "x$gcc_cv_isl" = xno; then
noconfigdirs="$noconfigdirs cloog isl"
islinc=
clooglibs=
fi
+# If the CLooG check failed, disable builds of in-tree
+# variants of CLooG
+if test "x$with_cloog" = xno ||
+ test "x$gcc_cv_cloog" = xno; then
+ noconfigdirs="$noconfigdirs cloog isl"
+ clooginc=
+ clooglibs=
+fi
+
case $lib in
- mpc | mpfr | gmp | cloog)
+ mpc | mpfr | gmp | isl | cloog)
# If we're processing --with-$lib, --with-$lib-include or
# --with-$lib-lib, for one of the libs above, and target is
# different from host, don't pass the current argument to any
build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
-#
+#f
host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv"
# these tools are built for the host environment
Equivalent to --with-isl-include=PATH/include
plus --with-isl-lib=PATH/lib])])
-# Treat either --without-cloog or --without-isl as a request to disable
+# Treat --without-isl as a request to disable
# GRAPHITE support and skip all following checks.
-if test "x$with_isl" != "xno" &&
- test "x$with_cloog" != "xno"; then
+if test "x$with_isl" != "xno"; then
# Check for ISL
dnl Provide configure switches and initialize islinc & isllibs
dnl with user input.
fi
fi
-# If either the ISL or the CLooG check failed, disable builds of in-tree
-# variants of both
+# If the ISL check failed, disable builds of in-tree
+# variants of both ISL and CLooG
if test "x$with_isl" = xno ||
- test "x$with_cloog" = xno ||
- test "x$gcc_cv_cloog" = xno ||
test "x$gcc_cv_isl" = xno; then
noconfigdirs="$noconfigdirs cloog isl"
islinc=
clooglibs=
fi
+# If the CLooG check failed, disable builds of in-tree
+# variants of CLooG
+if test "x$with_cloog" = xno ||
+ test "x$gcc_cv_cloog" = xno; then
+ noconfigdirs="$noconfigdirs cloog isl"
+ clooginc=
+ clooglibs=
+fi
+
+AC_SUBST(isllibs)
AC_SUBST(islinc)
AC_SUBST(clooglibs)
AC_SUBST(clooginc)
-
# Check for LTO support.
AC_ARG_ENABLE(lto,
[AS_HELP_STRING([--enable-lto], [enable link time optimization support])],
changequote([,])
case $lib in
- mpc | mpfr | gmp | cloog)
+ mpc | mpfr | gmp | isl | cloog)
# If we're processing --with-$lib, --with-$lib-include or
# --with-$lib-lib, for one of the libs above, and target is
# different from host, don't pass the current argument to any
+2014-08-18 Roman Gareev <gareevroman@gmail.com>
+
+ * Makefile.in: Add definition of ISLLIBS, HOST_ISLLIBS.
+ * config.in: Add undef of HAVE_isl.
+ * configure: Regenerate.
+ * configure.ac: Add definition of HAVE_isl.
+ * graphite-blocking.c: Add checking of HAVE_isl.
+ * graphite-dependences.c: Likewise.
+ * graphite-interchange.c: Likewise.
+ * graphite-isl-ast-to-gimple.c: Likewise.
+ * graphite-optimize-isl.c: Likewise.
+ * graphite-poly.c: Likewise.
+ * graphite-scop-detection.c: Likewise.
+ * graphite-sese-to-poly.c: Likewise.
+ * graphite.c: Likewise.
+ * toplev.c: Replace the checking of HAVE_cloog with the checking
+ of HAVE_isl.
+
2014-08-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/62090
GMPINC = @GMPINC@
# How to find ISL
+ISLLIBS = @ISLLIBS@
ISLINC = @ISLINC@
# How to find CLOOG
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(CLOOGLIBS) $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
#undef HAVE_WORKING_VFORK
#endif
+/* Define if isl is in use. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_isl
+#endif
/* Define if cloog is in use. */
#ifndef USED_FOR_TARGET
#undef HAVE_cloog
#endif
-
/* Define if F_SETLKW supported by fcntl. */
#ifndef USED_FOR_TARGET
#undef HOST_HAS_F_SETLKW
+if test "x${ISLLIBS}" != "x" ; then
+
+$as_echo "#define HAVE_isl 1" >>confdefs.h
+
+fi
AC_ARG_VAR(ISLLIBS,[How to link ISL])
AC_ARG_VAR(ISLINC,[How to find ISL include files])
+if test "x${ISLLIBS}" != "x" ; then
+ AC_DEFINE(HAVE_isl, 1, [Define if isl is in use.])
+fi
AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG])
AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "tree-data-ref.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/flow.h>
#include <isl/constraint.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-htab.h"
return res;
}
+#ifdef HAVE_cloog
+
/* Return true when the loop at DEPTH carries dependences. BODY is
the body of the loop. */
}
#endif
+#endif
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/aff.h>
#include <isl/set.h>
#include <isl/map.h>
#if defined(__cplusplus)
}
#endif
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
/* XXX isl rewrite following comment */
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include "tree-into-ssa.h"
#include <map>
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-isl-ast-to-gimple.h"
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
static isl_union_set *
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#if defined(__cplusplus)
}
#endif
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#define OPENSCOP_MAX_STRING 256
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "tree-ssa-propagate.h"
#include "cp/cp-tree.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#if defined(__cplusplus)
}
#endif
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "sese.h"
#include "tree-ssa-propagate.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "expr.h"
#include "graphite-poly.h"
#include "graphite-sese-to-poly.h"
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/options.h>
#include <isl/union_map.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#include <cloog/isl/cloog.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
#include "tree-pass.h"
#include "tree-cfgcleanup.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
-#include "graphite-clast-to-gimple.h"
#include "graphite-isl-ast-to-gimple.h"
#include "graphite-sese-to-poly.h"
#include "graphite-htab.h"
+#ifdef HAVE_cloog
+#include "graphite-clast-to-gimple.h"
+
CloogState *cloog_state;
+#endif
/* Print global statistics to FILE. */
recompute_all_dominators ();
initialize_original_copy_tables ();
+#ifdef HAVE_cloog
cloog_state = cloog_isl_state_malloc (ctx);
+#endif
if (dump_file && dump_flags)
dump_function_to_file (current_function_decl, dump_file, dump_flags);
tree_estimate_probability ();
}
+#ifdef HAVE_cloog
cloog_state_free (cloog_state);
+#endif
free_original_copy_tables ();
if (dump_file && dump_flags)
}
bb_pbb_htab_type bb_pbb_mapping (10);
+
+#ifndef HAVE_cloog
+ if(flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
+ {
+ flag_graphite_code_gen = FGRAPHITE_CODE_GEN_ISL;
+ printf ("The CLooG code generator cannot be used (CLooG is not "
+ "available). The ISL code generator was chosen.\n");
+ }
+#endif
+
FOR_EACH_VEC_ELT (scops, i, scop)
if (dbg_cnt (graphite_scop))
{
scop->ctx = ctx;
build_poly_scop (scop);
+#ifdef HAVE_cloog
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
&& (((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_ISL)
|| ((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
&& graphite_regenerate_ast_cloog (scop, &bb_pbb_mapping))))
need_cfg_cleanup_p = true;
+#else
+ if (POLY_SCOP_P (scop)
+ && apply_poly_transforms (scop)
+ && graphite_regenerate_ast_isl (scop))
+ need_cfg_cleanup_p = true;
+#endif
+
}
free_scops (scops);
isl_ctx_free (ctx);
}
-#else /* If Cloog is not available: #ifndef HAVE_cloog. */
+#else /* If ISL is not available: #ifndef HAVE_isl. */
static void
graphite_transform_loops (void)
{
- sorry ("Graphite loop optimizations cannot be used");
+ sorry ("Graphite loop optimizations cannot be used (ISL is not available).");
}
#endif
else
aux_base_name = "gccaux";
-#ifndef HAVE_cloog
+#ifndef HAVE_isl
if (flag_graphite
|| flag_graphite_identity
|| flag_loop_block
|| flag_loop_interchange
|| flag_loop_strip_mine
|| flag_loop_parallelize_all)
- sorry ("Graphite loop optimizations cannot be used (-fgraphite, "
- "-fgraphite-identity, -floop-block, "
+ sorry ("Graphite loop optimizations cannot be used (ISL is not available)"
+ "(-fgraphite, -fgraphite-identity, -floop-block, "
"-floop-interchange, -floop-strip-mine, -floop-parallelize-all, "
"and -ftree-loop-linear)");
#endif