diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-07-14 14:40:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-07-14 14:40:28 +0000 |
commit | ff30db507c45ce20b961beaca9bbd03e62ac16e1 (patch) | |
tree | 781a8f74c6114e25cb7e4d2bcef7eebc6afbcbfe /5.1.0/gentoo | |
parent | initial 4.9.3 patchset based on last 4.9.2 patchset (diff) | |
download | gcc-patches-ff30db507c45ce20b961beaca9bbd03e62ac16e1.tar.gz gcc-patches-ff30db507c45ce20b961beaca9bbd03e62ac16e1.tar.bz2 gcc-patches-ff30db507c45ce20b961beaca9bbd03e62ac16e1.zip |
add support for isl-0.15 #552278 by Steffen Hau
Diffstat (limited to '5.1.0/gentoo')
-rw-r--r-- | 5.1.0/gentoo/74_all_gcc5_isl-dl.patch | 25 | ||||
-rw-r--r-- | 5.1.0/gentoo/75_all_gcc5-isl-0.15.patch | 209 | ||||
-rw-r--r-- | 5.1.0/gentoo/README.history | 4 |
3 files changed, 234 insertions, 4 deletions
diff --git a/5.1.0/gentoo/74_all_gcc5_isl-dl.patch b/5.1.0/gentoo/74_all_gcc5_isl-dl.patch index bf3af80..42bc890 100644 --- a/5.1.0/gentoo/74_all_gcc5_isl-dl.patch +++ b/5.1.0/gentoo/74_all_gcc5_isl-dl.patch @@ -3,10 +3,12 @@ cloog upgrades that change the soname from breaking the compiler. http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc5-isl-dl.patch - In FreeBSD dlopen is part of libc so we can't just hardcode -ldl. We abuse the existing plugin check logic to pull out that info. +extended by Gentoo to support isl-0.15 +https://bugs.gentoo.org/552278 + --- gcc/Makefile.in.jj 2012-12-13 17:09:20.000000000 +0100 +++ gcc/Makefile.in 2012-12-14 11:45:22.585670055 +0100 @@ -1006,7 +1006,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) @@ -62,11 +64,13 @@ We abuse the existing plugin check logic to pull out that info. --- gcc/graphite-poly.h.jj 2012-12-13 11:31:27.000000000 +0100 +++ gcc/graphite-poly.h 2012-12-14 13:41:41.970800726 +0100 -@@ -22,6 +22,478 @@ along with GCC; see the file COPYING3. +@@ -22,6 +22,489 @@ along with GCC; see the file COPYING3. #ifndef GCC_GRAPHITE_POLY_H #define GCC_GRAPHITE_POLY_H +#include <isl/aff.h> ++#include <isl/constraint.h> ++#include <isl/union_set.h> +#include <isl/schedule.h> +#include <isl/ilp.h> +#include <isl/flow.h> @@ -80,6 +84,11 @@ We abuse the existing plugin check logic to pull out that info. +#else +#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_zero_distance) +#endif ++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS ++#define DYNSYM_FUSE DYNSYM (isl_options_set_schedule_serialize_sccs) ++#else ++#define DYNSYM_FUSE DYNSYM (isl_options_set_schedule_fuse) ++#endif +#define DYNSYMS \ + DYNSYM (isl_aff_add_coefficient_si); \ + DYNSYM (isl_aff_free); \ @@ -143,7 +152,7 @@ We abuse the existing plugin check logic to pull out that info. + DYNSYM (isl_map_set_tuple_id); \ + DYNSYM (isl_map_universe); \ + DYNSYM (isl_options_set_on_error); \ -+ DYNSYM (isl_options_set_schedule_fuse); \ ++ DYNSYM_FUSE; \ + DYNSYM (isl_options_set_schedule_max_constant_term); \ + DYNSYM (isl_options_set_schedule_maximize_band_depth); \ + DYNSYM (isl_printer_free); \ @@ -378,7 +387,11 @@ We abuse the existing plugin check logic to pull out that info. +#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id) +#define isl_map_universe (*isl_pointers__.p_isl_map_universe) +#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error) ++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS ++#define isl_options_set_schedule_serialize_sccs (*isl_pointers__.p_isl_options_set_schedule_serialize_sccs) ++#else +#define isl_options_set_schedule_fuse (*isl_pointers__.p_isl_options_set_schedule_fuse) ++#endif +#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term) +#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth) +#define isl_printer_free (*isl_pointers__.p_isl_printer_free) @@ -543,7 +556,7 @@ We abuse the existing plugin check logic to pull out that info. typedef struct poly_bb *poly_bb_p; --- gcc/graphite.c.jj 2012-12-13 11:31:00.000000000 +0100 +++ gcc/graphite.c 2012-12-14 13:40:44.155136961 +0100 -@@ -90,6 +90,34 @@ along with GCC; see the file COPYING3. +@@ -90,6 +90,38 @@ along with GCC; see the file COPYING3. #include "graphite-isl-ast-to-gimple.h" #include "graphite-sese-to-poly.h" @@ -556,7 +569,11 @@ We abuse the existing plugin check logic to pull out that info. + + if (isl_pointers__.inited) + return isl_pointers__.h != NULL; ++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS ++ h = dlopen ("libisl.so.15", RTLD_LAZY); ++#else + h = dlopen ("libisl.so.13", RTLD_LAZY); ++#endif + isl_pointers__.h = h; + if (h == NULL) + return false; diff --git a/5.1.0/gentoo/75_all_gcc5-isl-0.15.patch b/5.1.0/gentoo/75_all_gcc5-isl-0.15.patch new file mode 100644 index 0000000..0a35148 --- /dev/null +++ b/5.1.0/gentoo/75_all_gcc5-isl-0.15.patch @@ -0,0 +1,209 @@ +https://bugs.gentoo.org/552278 + +add support for isl-0.15 + +--- 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 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5725,6 +5725,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" +@@ -5738,6 +5740,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" + CXXFLAGS="$saved_CXXFLAGS" + +@@ -5745,6 +5754,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 +--- a/gcc/configure ++++ b/gcc/configure +@@ -28456,6 +28456,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" +@@ -28485,6 +28487,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 <isl/schedule.h> ++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" + +@@ -28493,6 +28518,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 +--- a/gcc/graphite-dependences.c ++++ b/gcc/graphite-dependences.c +@@ -205,7 +204,7 @@ scop_get_transformed_schedule (scop_p scop, vec<poly_bb_p> 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 +216,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 +240,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 +254,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; +--- a/gcc/graphite-optimize-isl.c ++++ b/gcc/graphite-optimize-isl.c +@@ -506,13 +506,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 +@@ -584,7 +584,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 +--- 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/5.1.0/gentoo/README.history b/5.1.0/gentoo/README.history index 01166bb..25557d0 100644 --- a/5.1.0/gentoo/README.history +++ b/5.1.0/gentoo/README.history @@ -1,3 +1,7 @@ +1.2 14 Jul 2015 + U 74_all_gcc5_isl-dl.patch + + 75_all_gcc5-isl-0.15.patch + 1.1 27 May 2015 + 45_all_linux-pthread-reentrant.patch |