public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][5] Backport ISL 0.15 support
@ 2015-10-12 10:58 Richard Biener
  2015-11-18 19:10 ` [PATCH] [4.9] " Matthias Klose
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2015-10-12 10:58 UTC (permalink / raw)
  To: gcc-patches


This backports the patch to allow bootstrapping with ISL 0.15 to the
GCC 5 branch (the GCC 4.9 branch will require backporting of some
dependencies).

Bootstrapped with ISL 0.15 (in-tree), ISL 0.14 and ISL 0.12 (both 
installed).

Committed to the branch.

Richard.

2015-10-12  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2015-07-21  Mike Frysinger  <vapier@gentoo.org>
		    Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* configure.ac: Add check for new options in isl-0.15.
	* config.in, configure: Rebuilt.
	* graphite-blocking.c: Include <isl/constraint.h>
	* graphite-interchange.c,  graphite-poly.c: Likewise.
	* graphhite-scop-detection.c, graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Include <isl/constraint.h> and
	<isl/union_set.h>.
	* graphite-dependences.c: Include <isl/constraint.h>.
	(max_number_of_out_dimensions): Returns isl_stat.
	(extend_schedule_1): Likewise
	(extend_schedule): Corresponding changes.
	* graphite-optimize-isl.c: Include <isl/constraint.h> and
	<isl/union_set.h>.
	(getSingleMap): Change return type of isl_stat.
	(optimize_isl): Conditionally use
	isl_options_set_schedule_serialize_sccs.
	* graphite-poly.h (isl_stat, isl_stat_ok): Define fallbacks
	if not HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS.

Index: gcc/config.in
===================================================================
--- gcc/config.in	(revision 228597)
+++ gcc/config.in	(working copy)
@@ -1313,6 +1313,12 @@
 #endif
 
 
+/* Define if isl_options_set_schedule_serialize_sccs exists. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+#endif
+
+
 /* Define if isl_schedule_constraints_compute_schedule exists. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
Index: gcc/configure
===================================================================
--- gcc/configure	(revision 228597)
+++ gcc/configure	(working copy)
@@ -28305,6 +28305,8 @@ fi
 
 # Check whether isl_schedule_constraints_compute_schedule is available;
 # it's new in ISL-0.13.
+# Check whether isl_options_set_schedule_serialize_sccs is available;
+# it's new in ISL-0.15.
 if test "x${ISLLIBS}" != "x" ; then
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $ISLINC"
@@ -28334,6 +28336,29 @@ rm -f core conftest.err conftest.$ac_obj
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
 $as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_options_set_schedule_serialize_sccs" >&5
+$as_echo_n "checking Checking for isl_options_set_schedule_serialize_sccs... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <isl/schedule.h>
+int
+main ()
+{
+isl_options_set_schedule_serialize_sccs (NULL, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_has_isl_options_set_schedule_serialize_sccs=yes
+else
+  ac_has_isl_options_set_schedule_serialize_sccs=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
+$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
+
   LIBS="$saved_LIBS"
   CFLAGS="$saved_CFLAGS"
 
@@ -28342,6 +28367,12 @@ $as_echo "$ac_has_isl_schedule_constrain
 $as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
 
   fi
+
+  if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+
+$as_echo "#define HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS 1" >>confdefs.h
+
+  fi
 fi
 
 # Check for plugin support
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 228597)
+++ gcc/configure.ac	(working copy)
@@ -5746,6 +5746,8 @@ fi
 
 # Check whether isl_schedule_constraints_compute_schedule is available;
 # it's new in ISL-0.13.
+# Check whether isl_options_set_schedule_serialize_sccs is available;
+# it's new in ISL-0.15.
 if test "x${ISLLIBS}" != "x" ; then
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $ISLINC"
@@ -5759,6 +5761,13 @@ if test "x${ISLLIBS}" != "x" ; then
               [ac_has_isl_schedule_constraints_compute_schedule=no])
   AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
 
+  AC_MSG_CHECKING([Checking for isl_options_set_schedule_serialize_sccs])
+  AC_TRY_LINK([#include <isl/schedule.h>],
+              [isl_options_set_schedule_serialize_sccs (NULL, 0);],
+              [ac_has_isl_options_set_schedule_serialize_sccs=yes],
+              [ac_has_isl_options_set_schedule_serialize_sccs=no])
+  AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
+
   LIBS="$saved_LIBS"
   CFLAGS="$saved_CFLAGS"
 
@@ -5766,6 +5775,11 @@ if test "x${ISLLIBS}" != "x" ; then
      AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
                [Define if isl_schedule_constraints_compute_schedule exists.])
   fi
+
+  if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+     AC_DEFINE(HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS, 1,
+               [Define if isl_options_set_schedule_serialize_sccs exists.])
+  fi
 fi
 
 GCC_ENABLE_PLUGINS
Index: gcc/graphite-blocking.c
===================================================================
--- gcc/graphite-blocking.c	(revision 228597)
+++ gcc/graphite-blocking.c	(working copy)
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite-dependences.c
===================================================================
--- gcc/graphite-dependences.c	(revision 228597)
+++ gcc/graphite-dependences.c	(working copy)
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
@@ -227,7 +228,7 @@ scop_get_transformed_schedule (scop_p sc
 /* Helper function used on each MAP of a isl_union_map.  Computes the
    maximal output dimension.  */
 
-static int
+static isl_stat
 max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
 {
   int global_max = *((int *) user);
@@ -239,7 +240,7 @@ max_number_of_out_dimensions (__isl_take
 
   isl_map_free (map);
   isl_space_free (space);
-  return 0;
+  return isl_stat_ok;
 }
 
 /* Extends the output dimension of MAP to MAX dimensions.  */
@@ -263,12 +264,12 @@ struct extend_schedule_str {
 
 /* Helper function for extend_schedule.  */
 
-static int
+static isl_stat
 extend_schedule_1 (__isl_take isl_map *map, void *user)
 {
   struct extend_schedule_str *str = (struct extend_schedule_str *) user;
   str->umap = isl_union_map_add_map (str->umap, extend_map (map, str->max));
-  return 0;
+  return isl_stat_ok;
 }
 
 /* Return a relation that has uniform output dimensions.  */
@@ -277,16 +278,16 @@ __isl_give isl_union_map *
 extend_schedule (__isl_take isl_union_map *x)
 {
   int max = 0;
-  int res;
+  isl_stat res;
   struct extend_schedule_str str;
 
   res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
-  gcc_assert (res == 0);
+  gcc_assert (res == isl_stat_ok);
 
   str.max = max;
   str.umap = isl_union_map_empty (isl_union_map_get_space (x));
   res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
-  gcc_assert (res == 0);
+  gcc_assert (res == isl_stat_ok);
 
   isl_union_map_free (x);
   return str.umap;
Index: gcc/graphite-interchange.c
===================================================================
--- gcc/graphite-interchange.c	(revision 228597)
+++ gcc/graphite-interchange.c	(working copy)
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/aff.h>
 #include <isl/set.h>
 #include <isl/map.h>
Index: gcc/graphite-isl-ast-to-gimple.c
===================================================================
--- gcc/graphite-isl-ast-to-gimple.c	(revision 228597)
+++ gcc/graphite-isl-ast-to-gimple.c	(working copy)
@@ -21,7 +21,9 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
+#include <isl/union_set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
 #include <isl/ast_build.h>
Index: gcc/graphite-optimize-isl.c
===================================================================
--- gcc/graphite-optimize-isl.c	(revision 228597)
+++ gcc/graphite-optimize-isl.c	(working copy)
@@ -21,7 +21,9 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
+#include <isl/union_set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
 #include <isl/schedule.h>
@@ -530,13 +532,13 @@ getScheduleMap (isl_schedule *Schedule,
   return ScheduleMap;
 }
 
-static int
+static isl_stat
 getSingleMap (__isl_take isl_map *map, void *user)
 {
   isl_map **singleMap = (isl_map **) user;
   *singleMap = map;
 
-  return 0;
+  return isl_stat_ok;
 }
 
 static void
@@ -608,7 +610,11 @@ optimize_isl (scop_p scop)
 
   isl_options_set_schedule_max_constant_term (scop->ctx, CONSTANT_BOUND);
   isl_options_set_schedule_maximize_band_depth (scop->ctx, 1);
+#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+  isl_options_set_schedule_serialize_sccs (scop->ctx, 1);
+#else
   isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN);
+#endif
   isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_CONTINUE);
 
 #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
Index: gcc/graphite-poly.c
===================================================================
--- gcc/graphite-poly.c	(revision 228597)
+++ gcc/graphite-poly.c	(working copy)
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite-poly.h
===================================================================
--- gcc/graphite-poly.h	(revision 228597)
+++ gcc/graphite-poly.h	(working copy)
@@ -22,6 +22,11 @@ along with GCC; see the file COPYING3.
 #ifndef GCC_GRAPHITE_POLY_H
 #define GCC_GRAPHITE_POLY_H
 
+#ifndef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+# define isl_stat int
+# define isl_stat_ok 0
+#endif
+
 typedef struct poly_dr *poly_dr_p;
 
 typedef struct poly_bb *poly_bb_p;
Index: gcc/graphite-scop-detection.c
===================================================================
--- gcc/graphite-scop-detection.c	(revision 228597)
+++ gcc/graphite-scop-detection.c	(working copy)
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite-sese-to-poly.c
===================================================================
--- gcc/graphite-sese-to-poly.c	(revision 228597)
+++ gcc/graphite-sese-to-poly.c	(working copy)
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite.c
===================================================================
--- gcc/graphite.c	(revision 228597)
+++ gcc/graphite.c	(working copy)
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/options.h>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] [4.9] Re: [PATCH][5] Backport ISL 0.15 support
  2015-10-12 10:58 [PATCH][5] Backport ISL 0.15 support Richard Biener
@ 2015-11-18 19:10 ` Matthias Klose
  2015-11-19  8:07   ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2015-11-18 19:10 UTC (permalink / raw)
  To: Richard Biener, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

On 12.10.2015 12:58, Richard Biener wrote:
>
> This backports the patch to allow bootstrapping with ISL 0.15 to the
> GCC 5 branch (the GCC 4.9 branch will require backporting of some
> dependencies).

I don't think so. 4.8 and 4.9 don't use as much ISL code as 5 does.  I had a 
look at the backport and came up with something which is just mechanical changes 
for the cpp conditional.

The version check in the toplevel configure needs to be extended.  I'm currently 
not checking non matching isl and cloog versions.

Now build for 4.9 using ISL 0.15 and 0.14. Ok to commit to the branch?

Matthias



[-- Attachment #2: isl-0.15.diff --]
[-- Type: text/x-diff, Size: 9055 bytes --]

2015-11-18  Matthias Klose  <doko@ubuntu.com>

	* configure.ac: Permit also ISL 0.15 with CLooG.
	* configure: Regenerate.

gcc/
2015-11-18  Matthias Klose  <doko@ubuntu.com>

	Backport from the gcc-5-branch

	Backport from mainline
	2015-07-21  Mike Frysinger  <vapier@gentoo.org>
		    Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* configure.ac: Add check for new options in isl-0.15.
	* config.in, configure: Rebuilt.
	* graphite-blocking.c: Include <isl/constraint.h>
	* graphite-interchange.c,  graphite-poly.c: Likewise.
	* graphhite-scop-detection.c, graphite-sese-to-poly.c: Likewise.
	* graphite.c, graphite-poly.c: Likewise.
	* graphite-dependences.c: Include <isl/constraint.h>.
	(max_number_of_out_dimensions): Returns isl_stat.
	(extend_schedule_1): Likewise
	(extend_schedule): Corresponding changes.
	* graphite-optimize-isl.c: Include <isl/constraint.h> and
	<isl/union_set.h>.
	(getSingleMap): Change return type of isl_stat.
	(optimize_isl): Conditionally use
	isl_options_set_schedule_serialize_sccs.
	* graphite-poly.h (isl_stat, isl_stat_ok): Define fallbacks
	if not HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS.


Index: configure.ac
===================================================================
--- configure.ac	(revision 230544)
+++ configure.ac	(working copy)
@@ -1660,6 +1660,9 @@
       ISL_CHECK_VERSION(0,12)
       if test "${gcc_cv_isl}" = no ; then
         ISL_CHECK_VERSION(0,14)
+        if test "${gcc_cv_isl}" = no ; then
+          ISL_CHECK_VERSION(0,15)
+        fi
       fi
     fi
   fi
Index: gcc/config.in
===================================================================
--- gcc/config.in	(revision 230544)
+++ gcc/config.in	(working copy)
@@ -1223,6 +1223,12 @@
 #endif
 
 
+/* Define if isl_options_set_schedule_serialize_sccs exists. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+#endif
+
+
 /* Define if isl_schedule_constraints_compute_schedule exists. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 230544)
+++ gcc/configure.ac	(working copy)
@@ -5535,6 +5535,8 @@
 
   # Check whether isl_schedule_constraints_compute_schedule is available;
   # it's new in ISL-0.13.
+  # Check whether isl_options_set_schedule_serialize_sccs is available;
+  # it's new in ISL-0.15.
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $ISLINC"
   saved_LIBS="$LIBS"
@@ -5547,6 +5549,13 @@
               [ac_has_isl_schedule_constraints_compute_schedule=no])
   AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
 
+  AC_MSG_CHECKING([Checking for isl_options_set_schedule_serialize_sccs])
+  AC_TRY_LINK([#include <isl/schedule.h>],
+              [isl_options_set_schedule_serialize_sccs (NULL, 0);],
+              [ac_has_isl_options_set_schedule_serialize_sccs=yes],
+              [ac_has_isl_options_set_schedule_serialize_sccs=no])
+  AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
+
   LIBS="$saved_LIBS"
   CFLAGS="$saved_CFLAGS"
 
@@ -5554,6 +5563,11 @@
      AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
                [Define if isl_schedule_constraints_compute_schedule exists.])
   fi
+
+  if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+     AC_DEFINE(HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS, 1,
+               [Define if isl_options_set_schedule_serialize_sccs exists.])
+  fi
 fi
 
 
Index: gcc/graphite-blocking.c
===================================================================
--- gcc/graphite-blocking.c	(revision 230544)
+++ gcc/graphite-blocking.c	(working copy)
@@ -24,6 +24,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite-dependences.c
===================================================================
--- gcc/graphite-dependences.c	(revision 230544)
+++ gcc/graphite-dependences.c	(working copy)
@@ -22,6 +22,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
@@ -183,7 +184,7 @@
 /* Helper function used on each MAP of a isl_union_map.  Computes the
    maximal output dimension.  */
 
-static int
+static isl_stat
 max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
 {
   int global_max = *((int *) user);
@@ -195,7 +196,7 @@
 
   isl_map_free (map);
   isl_space_free (space);
-  return 0;
+  return isl_stat_ok;
 }
 
 /* Extends the output dimension of MAP to MAX dimensions.  */
@@ -219,12 +220,12 @@
 
 /* Helper function for extend_schedule.  */
 
-static int
+static isl_stat
 extend_schedule_1 (__isl_take isl_map *map, void *user)
 {
   struct extend_schedule_str *str = (struct extend_schedule_str *) user;
   str->umap = isl_union_map_add_map (str->umap, extend_map (map, str->max));
-  return 0;
+  return isl_stat_ok;
 }
 
 /* Return a relation that has uniform output dimensions.  */
@@ -233,16 +234,16 @@
 extend_schedule (__isl_take isl_union_map *x)
 {
   int max = 0;
-  int res;
+  isl_stat res;
   struct extend_schedule_str str;
 
   res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
-  gcc_assert (res == 0);
+  gcc_assert (res == isl_stat_ok);
 
   str.max = max;
   str.umap = isl_union_map_empty (isl_union_map_get_space (x));
   res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
-  gcc_assert (res == 0);
+  gcc_assert (res == isl_stat_ok);
 
   isl_union_map_free (x);
   return str.umap;
Index: gcc/graphite-interchange.c
===================================================================
--- gcc/graphite-interchange.c	(revision 230544)
+++ gcc/graphite-interchange.c	(working copy)
@@ -24,6 +24,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/aff.h>
 #include <isl/set.h>
 #include <isl/map.h>
Index: gcc/graphite-optimize-isl.c
===================================================================
--- gcc/graphite-optimize-isl.c	(revision 230544)
+++ gcc/graphite-optimize-isl.c	(working copy)
@@ -21,7 +21,9 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
+#include <isl/union_set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
 #include <isl/schedule.h>
@@ -415,13 +417,13 @@
   return ScheduleMap;
 }
 
-static int
+static isl_stat
 getSingleMap (__isl_take isl_map *map, void *user)
 {
   isl_map **singleMap = (isl_map **) user;
   *singleMap = map;
 
-  return 0;
+  return isl_stat_ok;
 }
 
 static void
@@ -469,7 +471,11 @@
 
   isl_options_set_schedule_max_constant_term (scop->ctx, CONSTANT_BOUND);
   isl_options_set_schedule_maximize_band_depth (scop->ctx, 1);
+#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+  isl_options_set_schedule_serialize_sccs (scop->ctx, 1);
+#else
   isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN);
+#endif
   isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_CONTINUE);
   schedule = isl_union_set_compute_schedule (domain, validity, proximity);
   isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_ABORT);
Index: gcc/graphite-poly.c
===================================================================
--- gcc/graphite-poly.c	(revision 230544)
+++ gcc/graphite-poly.c	(working copy)
@@ -22,6 +22,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite-poly.h
===================================================================
--- gcc/graphite-poly.h	(revision 230544)
+++ gcc/graphite-poly.h	(working copy)
@@ -22,6 +22,11 @@
 #ifndef GCC_GRAPHITE_POLY_H
 #define GCC_GRAPHITE_POLY_H
 
+#ifndef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+# define isl_stat int
+# define isl_stat_ok 0
+#endif
+
 typedef struct poly_dr *poly_dr_p;
 
 typedef struct poly_bb *poly_bb_p;
Index: gcc/graphite-scop-detection.c
===================================================================
--- gcc/graphite-scop-detection.c	(revision 230544)
+++ gcc/graphite-scop-detection.c	(working copy)
@@ -22,6 +22,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite-sese-to-poly.c
===================================================================
--- gcc/graphite-sese-to-poly.c	(revision 230544)
+++ gcc/graphite-sese-to-poly.c	(working copy)
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/union_map.h>
Index: gcc/graphite.c
===================================================================
--- gcc/graphite.c	(revision 230544)
+++ gcc/graphite.c	(working copy)
@@ -35,6 +35,7 @@
 #include "config.h"
 
 #ifdef HAVE_cloog
+#include <isl/constraint.h>
 #include <isl/set.h>
 #include <isl/map.h>
 #include <isl/options.h>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [4.9] Re: [PATCH][5] Backport ISL 0.15 support
  2015-11-18 19:10 ` [PATCH] [4.9] " Matthias Klose
@ 2015-11-19  8:07   ` Richard Biener
  2015-11-19 15:17     ` Matthias Klose
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2015-11-19  8:07 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

On Wed, 18 Nov 2015, Matthias Klose wrote:

> On 12.10.2015 12:58, Richard Biener wrote:
> > 
> > This backports the patch to allow bootstrapping with ISL 0.15 to the
> > GCC 5 branch (the GCC 4.9 branch will require backporting of some
> > dependencies).
> 
> I don't think so. 4.8 and 4.9 don't use as much ISL code as 5 does.  I had a
> look at the backport and came up with something which is just mechanical
> changes for the cpp conditional.
> 
> The version check in the toplevel configure needs to be extended.  I'm
> currently not checking non matching isl and cloog versions.
> 
> Now build for 4.9 using ISL 0.15 and 0.14. Ok to commit to the branch?

Ok.  I wonder if we have a cloog version in infrastructure that builds
against ISL 0.1[45]?  IIRC cloog 0.18.1 doesn't.

Thanks,
Richard.

> Matthias
> 
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [4.9] Re: [PATCH][5] Backport ISL 0.15 support
  2015-11-19  8:07   ` Richard Biener
@ 2015-11-19 15:17     ` Matthias Klose
  0 siblings, 0 replies; 4+ messages in thread
From: Matthias Klose @ 2015-11-19 15:17 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

On 19.11.2015 09:07, Richard Biener wrote:
> On Wed, 18 Nov 2015, Matthias Klose wrote:
>
>> On 12.10.2015 12:58, Richard Biener wrote:
>>>
>>> This backports the patch to allow bootstrapping with ISL 0.15 to the
>>> GCC 5 branch (the GCC 4.9 branch will require backporting of some
>>> dependencies).
>>
>> I don't think so. 4.8 and 4.9 don't use as much ISL code as 5 does.  I had a
>> look at the backport and came up with something which is just mechanical
>> changes for the cpp conditional.
>>
>> The version check in the toplevel configure needs to be extended.  I'm
>> currently not checking non matching isl and cloog versions.
>>
>> Now build for 4.9 using ISL 0.15 and 0.14. Ok to commit to the branch?
>
> Ok.  I wonder if we have a cloog version in infrastructure that builds
> against ISL 0.1[45]?  IIRC cloog 0.18.1 doesn't.

No, that would be 0.18.4, the minimum requirement for isl 0.15.

Trying to rebuild 0.15 against 0.12.2 results in test failures (below), 
rebuilding against 0.14 doesn't show test failures.

Matthias

--- ./reservoir/QR.c 2014-10-02 14:33:50.000000000 +0000
+++ cloog_temp  2015-11-19 15:12:15.844164292 +0000
@@ -1,12 +1,6 @@
-/* Generated from ./reservoir/QR.cloog by CLooG 0.18.1-2-g43fc508 gmp bits in 
0.07s. */
+/* Generated from ./reservoir/QR.cloog by CLooG 0.18.4-b2b4f77 gmp bits in 
0.13s. */
  if (N >= 1) {
    S1(0);
-  if ((M <= 0) && (N >= 2)) {
-    S3(0);
-    S10(0);
-    S1(1);
-    S5(0);
-  }
    if ((M >= 1) && (N == 1)) {
      for (c4=0;c4<=M-1;c4++) {
        S2(0,c4);
@@ -34,6 +28,12 @@
      S10(0);
      S1(1);
      S5(0);
+  }
+  if ((M <= 0) && (N >= 2)) {
+    S3(0);
+    S10(0);
+    S1(1);
+    S5(0);
    }
    for (c2=2;c2<=min(M,N-1);c2++) {
      for (c4=c2-1;c4<=N-1;c4++) {
FAIL: ./reservoir/QR.c has a problem

--- ./isl/jacobi-shared.c  2014-10-02 16:33:52.000000000 +0000
+++ cloog_temp  2015-11-19 15:12:17.260192519 +0000
@@ -3,7 +3,7 @@
    if ((16*floord(t0-1,16) >= -N+g1+t0+1) && (16*floord(g1+t0-3,16) >= 
-N+g1+t0+1) && (32*floord(t1-1,32) >= -N+g2+t1+1) && (32*floord(g2+t1-3,32) >= 
t1-32)) {
      for 
(c0=max(-16*floord(t0-1,16)+t0,-16*floord(g1+t0-3,16)+t0);c0<=min(32,N-g1-1);c0+=16) 
{
        for (c1=-32*floord(t1-1,32)+t1;c1<=min(32,N-g2-1);c1+=32) {
-        if (c1 >= 1) {
+        if ((c1 >= 1) && (c1 <= 32)) {
            S1((c0+g1-1),(c1+g2-1));
          }
        }
FAIL: ./isl/jacobi-shared.c has a problemE

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-19 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 10:58 [PATCH][5] Backport ISL 0.15 support Richard Biener
2015-11-18 19:10 ` [PATCH] [4.9] " Matthias Klose
2015-11-19  8:07   ` Richard Biener
2015-11-19 15:17     ` Matthias Klose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).