aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoman Gareev <gareevroman@gmail.com>2014-08-18 15:42:11 +0000
committerRoman Gareev <romangareev@gcc.gnu.org>2014-08-18 15:42:11 +0000
commiteae1a5d419d30eca0905a78e45a8e3909983dd6a (patch)
treea353a3d31ffda81ef6d90612de9127c49b5fe3d1 /gcc
parentd7e78447084450a8961172d8670f3add9a439d3c (diff)
downloadgcc-eae1a5d419d30eca0905a78e45a8e3909983dd6a.zip
gcc-eae1a5d419d30eca0905a78e45a8e3909983dd6a.tar.gz
gcc-eae1a5d419d30eca0905a78e45a8e3909983dd6a.tar.bz2
configure.ac: Eliminate ClooG installation dependency.
* configure.ac: Eliminate ClooG installation dependency. * configure: Regenerate. * Makefile.tpl: Add definition of ISLLIBS and HOST_ISLLIBS. * Makefile.in: Regenerate. [config/] * cloog.m4: Remove the path to isllibs from clooglibs. * isl.m4: Add paths to islinc, isllibs. [gcc/] * Makefile.in: Add definition of ISLLIBS, HOST_ISLLIBS. * config.in: Add undef of HAVE_isl. * configure: Regenerate. * configure.ac: Add definition of HAVE_isl. * graphite-blocking.c: Add checking of HAVE_isl. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * toplev.c: Replace the checking of HAVE_cloog with the checking of HAVE_isl. From-SVN: r214106
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog18
-rw-r--r--gcc/Makefile.in3
-rw-r--r--gcc/config.in5
-rwxr-xr-xgcc/configure5
-rw-r--r--gcc/configure.ac3
-rw-r--r--gcc/graphite-blocking.c6
-rw-r--r--gcc/graphite-dependences.c9
-rw-r--r--gcc/graphite-interchange.c6
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c4
-rw-r--r--gcc/graphite-optimize-isl.c4
-rw-r--r--gcc/graphite-poly.c6
-rw-r--r--gcc/graphite-scop-detection.c6
-rw-r--r--gcc/graphite-sese-to-poly.c6
-rw-r--r--gcc/graphite.c37
-rw-r--r--gcc/toplev.c6
15 files changed, 98 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 75591f4..7f7a3bf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,21 @@
+2014-08-18 Roman Gareev <gareevroman@gmail.com>
+
+ * Makefile.in: Add definition of ISLLIBS, HOST_ISLLIBS.
+ * config.in: Add undef of HAVE_isl.
+ * configure: Regenerate.
+ * configure.ac: Add definition of HAVE_isl.
+ * graphite-blocking.c: Add checking of HAVE_isl.
+ * graphite-dependences.c: Likewise.
+ * graphite-interchange.c: Likewise.
+ * graphite-isl-ast-to-gimple.c: Likewise.
+ * graphite-optimize-isl.c: Likewise.
+ * graphite-poly.c: Likewise.
+ * graphite-scop-detection.c: Likewise.
+ * graphite-sese-to-poly.c: Likewise.
+ * graphite.c: Likewise.
+ * toplev.c: Replace the checking of HAVE_cloog with the checking
+ of HAVE_isl.
+
2014-08-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/62090
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 76ceca8..1b3820b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -335,6 +335,7 @@ GMPLIBS = @GMPLIBS@
GMPINC = @GMPINC@
# How to find ISL
+ISLLIBS = @ISLLIBS@
ISLINC = @ISLINC@
# How to find CLOOG
@@ -1011,7 +1012,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(CLOOGLIBS) $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
diff --git a/gcc/config.in b/gcc/config.in
index a1bda76..90809e3 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1699,13 +1699,16 @@
#undef HAVE_WORKING_VFORK
#endif
+/* Define if isl is in use. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_isl
+#endif
/* Define if cloog is in use. */
#ifndef USED_FOR_TARGET
#undef HAVE_cloog
#endif
-
/* Define if F_SETLKW supported by fcntl. */
#ifndef USED_FOR_TARGET
#undef HOST_HAS_F_SETLKW
diff --git a/gcc/configure b/gcc/configure
index fe2e647..5e0dcfb 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -27888,6 +27888,11 @@ fi
+if test "x${ISLLIBS}" != "x" ; then
+
+$as_echo "#define HAVE_isl 1" >>confdefs.h
+
+fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index ea8eca4..cdd5ed7 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5514,6 +5514,9 @@ AC_ARG_VAR(GMPINC,[How to find GMP include files])
AC_ARG_VAR(ISLLIBS,[How to link ISL])
AC_ARG_VAR(ISLINC,[How to find ISL include files])
+if test "x${ISLLIBS}" != "x" ; then
+ AC_DEFINE(HAVE_isl, 1, [Define if isl is in use.])
+fi
AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG])
AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c
index 20a24eb..2e83fea 100644
--- a/gcc/graphite-blocking.c
+++ b/gcc/graphite-blocking.c
@@ -23,14 +23,16 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -49,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-data-ref.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index a02bc23..cab6347 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -21,15 +21,17 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/flow.h>
#include <isl/constraint.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -49,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-htab.h"
@@ -630,6 +632,8 @@ graphite_legal_transform (scop_p scop)
return res;
}
+#ifdef HAVE_cloog
+
/* Return true when the loop at DEPTH carries dependences. BODY is
the body of the loop. */
@@ -685,3 +689,4 @@ loop_is_parallel_p (loop_p loop, bb_pbb_htab_type *bb_pbb_mapping, int depth)
}
#endif
+#endif
diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c
index 45db539..8d691db 100644
--- a/gcc/graphite-interchange.c
+++ b/gcc/graphite-interchange.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/aff.h>
#include <isl/set.h>
#include <isl/map.h>
@@ -37,9 +37,11 @@ extern "C" {
#if defined(__cplusplus)
}
#endif
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -59,7 +61,7 @@ extern "C" {
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
/* XXX isl rewrite following comment */
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 44357dc..5cb0919 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -55,7 +55,7 @@ extern "C" {
#include "tree-into-ssa.h"
#include <map>
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-isl-ast-to-gimple.h"
diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
index 31f3018..ce372e6 100644
--- a/gcc/graphite-optimize-isl.c
+++ b/gcc/graphite-optimize-isl.c
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
static isl_union_set *
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 28ab4df..57f62cd 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -21,7 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -36,9 +36,11 @@ extern "C" {
#if defined(__cplusplus)
}
#endif
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -60,7 +62,7 @@ extern "C" {
#include "tree-scalar-evolution.h"
#include "sese.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#define OPENSCOP_MAX_STRING 256
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 4158368..53823b8 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -21,13 +21,15 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -56,7 +58,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-propagate.h"
#include "cp/cp-tree.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index c36420a..c3adfe1 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -38,10 +38,12 @@ extern "C" {
#if defined(__cplusplus)
}
#endif
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -74,7 +76,7 @@ extern "C" {
#include "sese.h"
#include "tree-ssa-propagate.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "expr.h"
#include "graphite-poly.h"
#include "graphite-sese-to-poly.h"
diff --git a/gcc/graphite.c b/gcc/graphite.c
index aa5b8d8..650432d 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -34,15 +34,17 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include <isl/set.h>
#include <isl/map.h>
#include <isl/options.h>
#include <isl/union_map.h>
+#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#include <cloog/isl/cloog.h>
#endif
+#endif
#include "system.h"
#include "coretypes.h"
@@ -68,16 +70,19 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "tree-cfgcleanup.h"
-#ifdef HAVE_cloog
+#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-scop-detection.h"
-#include "graphite-clast-to-gimple.h"
#include "graphite-isl-ast-to-gimple.h"
#include "graphite-sese-to-poly.h"
#include "graphite-htab.h"
+#ifdef HAVE_cloog
+#include "graphite-clast-to-gimple.h"
+
CloogState *cloog_state;
+#endif
/* Print global statistics to FILE. */
@@ -228,7 +233,9 @@ graphite_initialize (isl_ctx *ctx)
recompute_all_dominators ();
initialize_original_copy_tables ();
+#ifdef HAVE_cloog
cloog_state = cloog_isl_state_malloc (ctx);
+#endif
if (dump_file && dump_flags)
dump_function_to_file (current_function_decl, dump_file, dump_flags);
@@ -251,7 +258,9 @@ graphite_finalize (bool need_cfg_cleanup_p)
tree_estimate_probability ();
}
+#ifdef HAVE_cloog
cloog_state_free (cloog_state);
+#endif
free_original_copy_tables ();
if (dump_file && dump_flags)
@@ -292,12 +301,23 @@ graphite_transform_loops (void)
}
bb_pbb_htab_type bb_pbb_mapping (10);
+
+#ifndef HAVE_cloog
+ if(flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
+ {
+ flag_graphite_code_gen = FGRAPHITE_CODE_GEN_ISL;
+ printf ("The CLooG code generator cannot be used (CLooG is not "
+ "available). The ISL code generator was chosen.\n");
+ }
+#endif
+
FOR_EACH_VEC_ELT (scops, i, scop)
if (dbg_cnt (graphite_scop))
{
scop->ctx = ctx;
build_poly_scop (scop);
+#ifdef HAVE_cloog
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
&& (((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_ISL)
@@ -305,6 +325,13 @@ graphite_transform_loops (void)
|| ((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
&& graphite_regenerate_ast_cloog (scop, &bb_pbb_mapping))))
need_cfg_cleanup_p = true;
+#else
+ if (POLY_SCOP_P (scop)
+ && apply_poly_transforms (scop)
+ && graphite_regenerate_ast_isl (scop))
+ need_cfg_cleanup_p = true;
+#endif
+
}
free_scops (scops);
@@ -313,12 +340,12 @@ graphite_transform_loops (void)
isl_ctx_free (ctx);
}
-#else /* If Cloog is not available: #ifndef HAVE_cloog. */
+#else /* If ISL is not available: #ifndef HAVE_isl. */
static void
graphite_transform_loops (void)
{
- sorry ("Graphite loop optimizations cannot be used");
+ sorry ("Graphite loop optimizations cannot be used (ISL is not available).");
}
#endif
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 88d48c2..aaad688 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1275,15 +1275,15 @@ process_options (void)
else
aux_base_name = "gccaux";
-#ifndef HAVE_cloog
+#ifndef HAVE_isl
if (flag_graphite
|| flag_graphite_identity
|| flag_loop_block
|| flag_loop_interchange
|| flag_loop_strip_mine
|| flag_loop_parallelize_all)
- sorry ("Graphite loop optimizations cannot be used (-fgraphite, "
- "-fgraphite-identity, -floop-block, "
+ sorry ("Graphite loop optimizations cannot be used (ISL is not available)"
+ "(-fgraphite, -fgraphite-identity, -floop-block, "
"-floop-interchange, -floop-strip-mine, -floop-parallelize-all, "
"and -ftree-loop-linear)");
#endif