Ticket #1019: gcc-5.2.0-isl-1.patch

File gcc-5.2.0-isl-1.patch, 10.1 KB (added by William Harrington, 9 years ago)
  • gcc/config.in

    diff -Naur gcc-5.2.0.orig/gcc/config.in gcc-5.2.0/gcc/config.in
    old new  
    13131313#endif
    13141314
    13151315
     1316/* Define if isl_options_set_schedule_serialize_sccs exists. */
     1317#ifndef USED_FOR_TARGET
     1318#undef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
     1319#endif
     1320
     1321
    13161322/* Define if isl_schedule_constraints_compute_schedule exists. */
    13171323#ifndef USED_FOR_TARGET
    13181324#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
  • gcc/configure

    diff -Naur gcc-5.2.0.orig/gcc/configure gcc-5.2.0/gcc/configure
    old new  
    2824528245
    2824628246# Check whether isl_schedule_constraints_compute_schedule is available;
    2824728247# it's new in ISL-0.13.
     28248# Check whether isl_options_set_schedule_serialize_sccs is available;
     28249# it's new in ISL-0.15.
    2824828250if test "x${ISLLIBS}" != "x" ; then
    2824928251  saved_CFLAGS="$CFLAGS"
    2825028252  CFLAGS="$CFLAGS $ISLINC"
     
    2827428276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
    2827528277$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
    2827628278
     28279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_options_set_schedule_serialize_sccs" >&5
     28280$as_echo_n "checking Checking for isl_options_set_schedule_serialize_sccs... " >&6; }
     28281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     28282/* end confdefs.h.  */
     28283#include <isl/schedule.h>
     28284int
     28285main ()
     28286{
     28287isl_options_set_schedule_serialize_sccs (NULL, 0);
     28288  ;
     28289  return 0;
     28290}
     28291_ACEOF
     28292if ac_fn_cxx_try_link "$LINENO"; then :
     28293  ac_has_isl_options_set_schedule_serialize_sccs=yes
     28294else
     28295  ac_has_isl_options_set_schedule_serialize_sccs=no
     28296fi
     28297rm -f core conftest.err conftest.$ac_objext \
     28298    conftest$ac_exeext conftest.$ac_ext
     28299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
     28300$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
     28301
    2827728302  LIBS="$saved_LIBS"
    2827828303  CFLAGS="$saved_CFLAGS"
    2827928304
     
    2828228307$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
    2828328308
    2828428309  fi
     28310
     28311  if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
     28312
     28313$as_echo "#define HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS 1" >>confdefs.h
     28314
     28315  fi
    2828528316fi
    2828628317
    2828728318# Check for plugin support
  • gcc/configure.ac

    diff -Naur gcc-5.2.0.orig/gcc/configure.ac gcc-5.2.0/gcc/configure.ac
    old new  
    56935693
    56945694# Check whether isl_schedule_constraints_compute_schedule is available;
    56955695# it's new in ISL-0.13.
     5696# Check whether isl_options_set_schedule_serialize_sccs is available;
     5697# it's new in ISL-0.15.
    56965698if test "x${ISLLIBS}" != "x" ; then
    56975699  saved_CFLAGS="$CFLAGS"
    56985700  CFLAGS="$CFLAGS $ISLINC"
     
    57065708              [ac_has_isl_schedule_constraints_compute_schedule=no])
    57075709  AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
    57085710
     5711  AC_MSG_CHECKING([Checking for isl_options_set_schedule_serialize_sccs])
     5712  AC_TRY_LINK([#include <isl/schedule.h>],
     5713              [isl_options_set_schedule_serialize_sccs (NULL, 0);],
     5714              [ac_has_isl_options_set_schedule_serialize_sccs=yes],
     5715              [ac_has_isl_options_set_schedule_serialize_sccs=no])
     5716  AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
     5717
    57095718  LIBS="$saved_LIBS"
    57105719  CFLAGS="$saved_CFLAGS"
    57115720
     
    57135722     AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
    57145723               [Define if isl_schedule_constraints_compute_schedule exists.])
    57155724  fi
     5725
     5726  if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
     5727     AC_DEFINE(HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS, 1,
     5728               [Define if isl_options_set_schedule_serialize_sccs exists.])
     5729  fi
    57165730fi
    57175731
    57185732GCC_ENABLE_PLUGINS
  • gcc/graphite-blocking.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-blocking.c gcc-5.2.0/gcc/graphite-blocking.c
    old new  
    2424#include "config.h"
    2525
    2626#ifdef HAVE_isl
     27#include <isl/constraint.h>
    2728#include <isl/set.h>
    2829#include <isl/map.h>
    2930#include <isl/union_map.h>
  • gcc/graphite-dependences.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-dependences.c gcc-5.2.0/gcc/graphite-dependences.c
    old new  
    2222#include "config.h"
    2323
    2424#ifdef HAVE_isl
     25#include <isl/constraint.h>
    2526#include <isl/set.h>
    2627#include <isl/map.h>
    2728#include <isl/union_map.h>
     
    227228/* Helper function used on each MAP of a isl_union_map.  Computes the
    228229   maximal output dimension.  */
    229230
    230 static int
     231static isl_stat
    231232max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
    232233{
    233234  int global_max = *((int *) user);
     
    239240
    240241  isl_map_free (map);
    241242  isl_space_free (space);
    242   return 0;
     243  return isl_stat_ok;
    243244}
    244245
    245246/* Extends the output dimension of MAP to MAX dimensions.  */
     
    263264
    264265/* Helper function for extend_schedule.  */
    265266
    266 static int
     267static isl_stat
    267268extend_schedule_1 (__isl_take isl_map *map, void *user)
    268269{
    269270  struct extend_schedule_str *str = (struct extend_schedule_str *) user;
    270271  str->umap = isl_union_map_add_map (str->umap, extend_map (map, str->max));
    271   return 0;
     272  return isl_stat_ok;
    272273}
    273274
    274275/* Return a relation that has uniform output dimensions.  */
     
    277278extend_schedule (__isl_take isl_union_map *x)
    278279{
    279280  int max = 0;
    280   int res;
     281  isl_stat res;
    281282  struct extend_schedule_str str;
    282283
    283284  res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
    284   gcc_assert (res == 0);
     285  gcc_assert (res == isl_stat_ok);
    285286
    286287  str.max = max;
    287288  str.umap = isl_union_map_empty (isl_union_map_get_space (x));
    288289  res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
    289   gcc_assert (res == 0);
     290  gcc_assert (res == isl_stat_ok);
    290291
    291292  isl_union_map_free (x);
    292293  return str.umap;
  • gcc/graphite-interchange.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-interchange.c gcc-5.2.0/gcc/graphite-interchange.c
    old new  
    2424#include "config.h"
    2525
    2626#ifdef HAVE_isl
     27#include <isl/constraint.h>
    2728#include <isl/aff.h>
    2829#include <isl/set.h>
    2930#include <isl/map.h>
  • gcc/graphite-isl-ast-to-gimple.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-isl-ast-to-gimple.c gcc-5.2.0/gcc/graphite-isl-ast-to-gimple.c
    old new  
    2121#include "config.h"
    2222
    2323#ifdef HAVE_isl
     24#include <isl/constraint.h>
    2425#include <isl/set.h>
     26#include <isl/union_set.h>
    2527#include <isl/map.h>
    2628#include <isl/union_map.h>
    2729#include <isl/ast_build.h>
  • gcc/graphite-optimize-isl.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-optimize-isl.c gcc-5.2.0/gcc/graphite-optimize-isl.c
    old new  
    2121#include "config.h"
    2222
    2323#ifdef HAVE_isl
     24#include <isl/constraint.h>
    2425#include <isl/set.h>
     26#include <isl/union_set.h>
    2527#include <isl/map.h>
    2628#include <isl/union_map.h>
    2729#include <isl/schedule.h>
     
    530532  return ScheduleMap;
    531533}
    532534
    533 static int
     535static isl_stat
    534536getSingleMap (__isl_take isl_map *map, void *user)
    535537{
    536538  isl_map **singleMap = (isl_map **) user;
    537539  *singleMap = map;
    538540
    539   return 0;
     541  return isl_stat_ok;
    540542}
    541543
    542544static void
     
    608610
    609611  isl_options_set_schedule_max_constant_term (scop->ctx, CONSTANT_BOUND);
    610612  isl_options_set_schedule_maximize_band_depth (scop->ctx, 1);
     613#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
     614  isl_options_set_schedule_serialize_sccs (scop->ctx, 1);
     615#else
    611616  isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN);
     617#endif
    612618  isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_CONTINUE);
    613619
    614620#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
  • gcc/graphite-poly.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-poly.c gcc-5.2.0/gcc/graphite-poly.c
    old new  
    2222#include "config.h"
    2323
    2424#ifdef HAVE_isl
     25#include <isl/constraint.h>
    2526#include <isl/set.h>
    2627#include <isl/map.h>
    2728#include <isl/union_map.h>
  • gcc/graphite-poly.h

    diff -Naur gcc-5.2.0.orig/gcc/graphite-poly.h gcc-5.2.0/gcc/graphite-poly.h
    old new  
    2222#ifndef GCC_GRAPHITE_POLY_H
    2323#define GCC_GRAPHITE_POLY_H
    2424
     25#ifndef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
     26# define isl_stat int
     27# define isl_stat_ok 0
     28#endif
     29
    2530typedef struct poly_dr *poly_dr_p;
    2631
    2732typedef struct poly_bb *poly_bb_p;
  • gcc/graphite-scop-detection.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-scop-detection.c gcc-5.2.0/gcc/graphite-scop-detection.c
    old new  
    2222#include "config.h"
    2323
    2424#ifdef HAVE_isl
     25#include <isl/constraint.h>
    2526#include <isl/set.h>
    2627#include <isl/map.h>
    2728#include <isl/union_map.h>
  • gcc/graphite-sese-to-poly.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite-sese-to-poly.c gcc-5.2.0/gcc/graphite-sese-to-poly.c
    old new  
    2121#include "config.h"
    2222
    2323#ifdef HAVE_isl
     24#include <isl/constraint.h>
    2425#include <isl/set.h>
    2526#include <isl/map.h>
    2627#include <isl/union_map.h>
  • gcc/graphite.c

    diff -Naur gcc-5.2.0.orig/gcc/graphite.c gcc-5.2.0/gcc/graphite.c
    old new  
    3535#include "config.h"
    3636
    3737#ifdef HAVE_isl
     38#include <isl/constraint.h>
    3839#include <isl/set.h>
    3940#include <isl/map.h>
    4041#include <isl/options.h>