From 324000329be228765b56c2b11d24256a8a30000e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 21 Jul 2015 18:33:35 +0000 Subject: [PATCH] configure.ac: Add check for new options in isl-0.15. * configure.ac: Add check for new options in isl-0.15. * config.in, configure: Rebuilt. * graphite-blocking.c: Include * 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 and . * graphite-dependences.c: Include . (max_number_of_out_dimensions): Returns isl_stat. (extend_schedule_1): Likewise (extend_schedule): Corresponding changes. * graphite-optimize-isl.c: Include and . (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. Co-Authored-By: Bernhard Reutner-Fischer From-SVN: r226050 --- gcc/ChangeLog | 23 +++++++++++++++++++++++ gcc/config.in | 6 ++++++ gcc/configure | 31 +++++++++++++++++++++++++++++++ gcc/configure.ac | 14 ++++++++++++++ gcc/graphite-blocking.c | 1 + gcc/graphite-dependences.c | 15 ++++++++------- gcc/graphite-interchange.c | 1 + gcc/graphite-isl-ast-to-gimple.c | 2 ++ gcc/graphite-optimize-isl.c | 10 ++++++++-- gcc/graphite-poly.c | 1 + gcc/graphite-poly.h | 5 +++++ gcc/graphite-scop-detection.c | 1 + gcc/graphite-sese-to-poly.c | 1 + gcc/graphite.c | 1 + 14 files changed, 103 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e25b9a0640..5e6915a1070 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2015-07-21 Mike Frysinger + Bernhard Reutner-Fischer + + * configure.ac: Add check for new options in isl-0.15. + * config.in, configure: Rebuilt. + * graphite-blocking.c: Include + * 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 and + . + * graphite-dependences.c: Include . + (max_number_of_out_dimensions): Returns isl_stat. + (extend_schedule_1): Likewise + (extend_schedule): Corresponding changes. + * graphite-optimize-isl.c: Include and + . + (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. + 2015-07-21 Georg-Johann Lay PR target/66956 diff --git a/gcc/config.in b/gcc/config.in index b35b0ee075a..67d03d17098 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1326,6 +1326,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 diff --git a/gcc/configure b/gcc/configure index 9fb885dfe63..08bce32dc88 100755 --- a/gcc/configure +++ b/gcc/configure @@ -28467,6 +28467,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_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $ISLINC" @@ -28496,6 +28498,29 @@ rm -f core conftest.err conftest.$ac_objext \ { $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 +int +main () +{ +isl_options_set_schedule_serialize_sccs (NULL, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_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" CXXFLAGS="$saved_CXXFLAGS" @@ -28504,6 +28529,12 @@ $as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; } $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 diff --git a/gcc/configure.ac b/gcc/configure.ac index bc574db4ac9..326bb5988b2 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5723,6 +5723,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_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $ISLINC" @@ -5736,6 +5738,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_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" CXXFLAGS="$saved_CXXFLAGS" @@ -5743,6 +5752,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 diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c index d9d16e8f15a..34342948409 100644 --- a/gcc/graphite-blocking.c +++ b/gcc/graphite-blocking.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index af18ecb333f..c3c20909144 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-dependences.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include @@ -205,7 +206,7 @@ scop_get_transformed_schedule (scop_p scop, vec pbbs) /* 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); @@ -217,7 +218,7 @@ max_number_of_out_dimensions (__isl_take isl_map *map, void *user) isl_map_free (map); isl_space_free (space); - return 0; + return isl_stat_ok; } /* Extends the output dimension of MAP to MAX dimensions. */ @@ -241,12 +242,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. */ @@ -255,16 +256,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; diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c index 03c2c6372bf..6b14955ced7 100644 --- a/gcc/graphite-interchange.c +++ b/gcc/graphite-interchange.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 618c62d42cf..dfb012f75b1 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -24,7 +24,9 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include +#include #include #include #include diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c index 87536b2a176..1b57c6cc6d2 100644 --- a/gcc/graphite-optimize-isl.c +++ b/gcc/graphite-optimize-isl.c @@ -24,7 +24,9 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include +#include #include #include #include @@ -507,13 +509,13 @@ getScheduleMap (isl_schedule *Schedule, isl_union_map **map_sepcl) 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 @@ -585,7 +587,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 diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 2eff5a5a33c..dd4fcee1522 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 82e12171499..062d927411e 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -24,6 +24,11 @@ along with GCC; see the file COPYING3. If not see #include "sese.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; diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 28de4ab3a5b..686f4956e1e 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 8960c3fca26..47944f0c3ee 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include diff --git a/gcc/graphite.c b/gcc/graphite.c index 6417da27215..9b9ab887287 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see /* Workaround for GMP 5.1.3 bug, see PR56019. */ #include +#include #include #include #include -- 2.30.2