This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][4.8] Backport ISL 0.14 support
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 8 Dec 2014 12:21:46 +0100 (CET)
- Subject: [PATCH][4.8] Backport ISL 0.14 support
- Authentication-results: sourceware.org; auth=none
I have installed the following patch on the 4.8 branch after verifying
it still builds ok and enables graphite with system ISL 0.14 and
system ISL 0.12.2 (and the corresponding cloog).
Richard.
2014-12-08 Richard Biener <rguenther@suse.de>
Backport from 4.9 branch
2014-12-04 Tobias Burnus <burnus@net-b.de>
* configure.ac: Permit also ISL 0.14 with CLooG.
* Makefile.def: Make more dependent on mpfr, mpc, isl, and cloog.
* Makefile.in: Regenerate.
* configure: Regenerate.
gcc/
* configure.ac
(ac_has_isl_schedule_constraints_compute_schedule):
New check.
* graphite-clast-to-gimple.c: For ISL 0.14, include deprecate headers.
* graphite-interchange.c: Ditto.
* graphite-poly.c: Ditto.
* graphite-sese-to-poly.c: Ditto.
* graphite-optimize-isl.c (getScheduleForBandList): Ditto.
Conditionally use ISL 0.13+ functions.
* config.in: Regenerate.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 218391)
+++ configure.ac (revision 218392)
@@ -1658,6 +1658,9 @@ if test "x$with_isl" != "xno" &&
ISL_CHECK_VERSION(0,11)
if test "${gcc_cv_isl}" = no ; then
ISL_CHECK_VERSION(0,12)
+ if test "${gcc_cv_isl}" = no ; then
+ ISL_CHECK_VERSION(0,14)
+ fi
fi
fi
dnl Only execute fail-action, if ISL has been requested.
Index: gcc/config.in
===================================================================
--- gcc/config.in (revision 218391)
+++ gcc/config.in (revision 218392)
@@ -1211,6 +1211,12 @@
#endif
+/* Define if isl_schedule_constraints_compute_schedule exists. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+#endif
+
+
/* Define to 1 if you have the `kill' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_KILL
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (revision 218391)
+++ gcc/configure.ac (revision 218392)
@@ -5495,8 +5495,31 @@ 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.])
+
+ # Check whether isl_schedule_constraints_compute_schedule is available;
+ # it's new in ISL-0.13.
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ISLINC"
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
+
+ AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
+ AC_TRY_LINK([#include <isl/schedule.h>],
+ [isl_schedule_constraints_compute_schedule (NULL);],
+ [ac_has_isl_schedule_constraints_compute_schedule=yes],
+ [ac_has_isl_schedule_constraints_compute_schedule=no])
+ AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
+
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
+
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
+ [Define if isl_schedule_constraints_compute_schedule exists.])
+ fi
fi
+
# Check for plugin support
AC_ARG_ENABLE(plugin,
[AS_HELP_STRING([--enable-plugin], [enable plugin support])],
Index: gcc/graphite-clast-to-gimple.c
===================================================================
--- gcc/graphite-clast-to-gimple.c (revision 218391)
+++ gcc/graphite-clast-to-gimple.c (revision 218392)
@@ -30,6 +30,11 @@ along with GCC; see the file COPYING3.
#include <isl/aff.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+#include <isl/deprecated/int.h>
+#include <isl/lp.h>
+#include <isl/deprecated/ilp_int.h>
+#endif
#endif
#include "system.h"
Index: gcc/graphite-optimize-isl.c
===================================================================
--- gcc/graphite-optimize-isl.c (revision 218391)
+++ gcc/graphite-optimize-isl.c (revision 218392)
@@ -28,6 +28,10 @@ along with GCC; see the file COPYING3.
#include <isl/band.h>
#include <isl/aff.h>
#include <isl/options.h>
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+#include <isl/deprecated/int.h>
+#include <isl/deprecated/aff_int.h>
+#endif
#endif
#include "system.h"
@@ -373,7 +377,11 @@ getScheduleForBandList (isl_band_list *B
{
for (i = ScheduleDimensions - 1 ; i >= 0 ; i--)
{
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+ if (isl_band_member_is_coincident (Band, i))
+#else
if (isl_band_member_is_zero_distance (Band, i))
+#endif
{
isl_map *TileMap;
isl_union_map *TileUMap;
Index: gcc/graphite-poly.c
===================================================================
--- gcc/graphite-poly.c (revision 218391)
+++ gcc/graphite-poly.c (revision 218392)
@@ -30,6 +30,10 @@ along with GCC; see the file COPYING3.
#include <isl/aff.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+#include <isl/deprecated/int.h>
+#include <isl/deprecated/ilp_int.h>
+#endif
#endif
#include "system.h"
Index: gcc/graphite-sese-to-poly.c
===================================================================
--- gcc/graphite-sese-to-poly.c (revision 218391)
+++ gcc/graphite-sese-to-poly.c (revision 218392)
@@ -29,6 +29,11 @@ along with GCC; see the file COPYING3.
#include <cloog/cloog.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+#include <isl/deprecated/int.h>
+#include <isl/deprecated/aff_int.h>
+#include <isl/deprecated/constraint_int.h>
+#endif
#endif
#include "system.h"
Index: gcc/graphite-interchange.c
===================================================================
--- gcc/graphite-interchange.c (revision 218391)
+++ gcc/graphite-interchange.c (revision 218392)
@@ -31,6 +31,12 @@ along with GCC; see the file COPYING3.
#include <isl/ilp.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+#include <isl/deprecated/int.h>
+#include <isl/deprecated/aff_int.h>
+#include <isl/deprecated/ilp_int.h>
+#include <isl/deprecated/constraint_int.h>
+#endif
#endif
#include "system.h"
Index: Makefile.def
===================================================================
--- Makefile.def (revision 218391)
+++ Makefile.def (revision 218392)
@@ -296,6 +296,10 @@ dependencies = { module=all-build-fixinc
// Host modules specific to gcc.
dependencies = { module=configure-gcc; on=configure-intl; };
dependencies = { module=configure-gcc; on=all-gmp; };
+dependencies = { module=configure-gcc; on=all-mpfr; };
+dependencies = { module=configure-gcc; on=all-mpc; };
+dependencies = { module=configure-gcc; on=all-isl; };
+dependencies = { module=configure-gcc; on=all-cloog; };
dependencies = { module=configure-gcc; on=all-lto-plugin; };
dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };