]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blame - gcc-isl0.15-1.patch
- filter out -fPIC from cflags, release 2
[packages/crossmingw32-gcc.git] / gcc-isl0.15-1.patch
CommitLineData
6ccf21dc
JB
1List-Id: <gcc-patches.gcc.gnu.org>
2List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
3From: Mike Frysinger <vapier at gentoo dot org>
4To: gcc-patches at gcc dot gnu dot org
5Subject: [PATCH] gcc: fix building w/isl-0.15
6Date: Tue, 14 Jul 2015 10:45:12 -0400
7Message-Id: <1436885112-2174-1-git-send-email-vapier@gentoo.org>
8
9---
10 gcc/config.in | 6 ++++++
11 gcc/configure | 31 +++++++++++++++++++++++++++++++
12 gcc/configure.ac | 14 ++++++++++++++
13 gcc/graphite-dependences.c | 14 +++++++-------
14 gcc/graphite-optimize-isl.c | 8 ++++++--
15 gcc/graphite-poly.h | 5 +++++
16 6 files changed, 69 insertions(+), 9 deletions(-)
17
18diff --git a/gcc/config.in b/gcc/config.in
19index b031a62..23e1757 100644
20--- a/gcc/config.in
21+++ b/gcc/config.in
22@@ -1326,6 +1326,12 @@
23 #endif
24
25
26+/* Define if isl_options_set_schedule_serialize_sccs exists. */
27+#ifndef USED_FOR_TARGET
28+#undef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
29+#endif
30+
31+
32 /* Define if isl_schedule_constraints_compute_schedule exists. */
33 #ifndef USED_FOR_TARGET
34 #undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
35diff --git a/gcc/configure b/gcc/configure
36index 9561e5c..6e81298 100755
37--- a/gcc/configure
38+++ b/gcc/configure
39@@ -27947,6 +27947,8 @@
40
41 # Check whether isl_schedule_constraints_compute_schedule is available;
42 # it's new in ISL-0.13.
43+ # Check whether isl_options_set_schedule_serialize_sccs is available;
44+ # it's new in ISL-0.15.
45 saved_CFLAGS="$CFLAGS"
46 CFLAGS="$CFLAGS $ISLINC"
47 saved_LIBS="$LIBS"
48@@ -27975,6 +27977,29 @@
49 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
50 $as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
51
52+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_options_set_schedule_serialize_sccs" >&5
53+$as_echo_n "checking Checking for isl_options_set_schedule_serialize_sccs... " >&6; }
54+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55+/* end confdefs.h. */
56+#include <isl/schedule.h>
57+int
58+main ()
59+{
60+isl_options_set_schedule_serialize_sccs (NULL, 0);
61+ ;
62+ return 0;
63+}
64+_ACEOF
65+if ac_fn_cxx_try_link "$LINENO"; then :
66+ ac_has_isl_options_set_schedule_serialize_sccs=yes
67+else
68+ ac_has_isl_options_set_schedule_serialize_sccs=no
69+fi
70+rm -f core conftest.err conftest.$ac_objext \
71+ conftest$ac_exeext conftest.$ac_ext
72+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
73+$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
74+
75 LIBS="$saved_LIBS"
76 CFLAGS="$saved_CFLAGS"
77
78@@ -27983,6 +28008,12 @@
79 $as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
80
81 fi
82+
83+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
84+
85+$as_echo "#define HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS 1" >>confdefs.h
86+
87+ fi
88 fi
89
90
91diff --git a/gcc/configure.ac b/gcc/configure.ac
92index cb14639..7fb964a 100644
93--- a/gcc/configure.ac
94+++ b/gcc/configure.ac
95@@ -5535,6 +5535,8 @@
96
97 # Check whether isl_schedule_constraints_compute_schedule is available;
98 # it's new in ISL-0.13.
99+ # Check whether isl_options_set_schedule_serialize_sccs is available;
100+ # it's new in ISL-0.15.
101 saved_CFLAGS="$CFLAGS"
102 CFLAGS="$CFLAGS $ISLINC"
103 saved_LIBS="$LIBS"
104@@ -5547,6 +5549,13 @@
105 [ac_has_isl_schedule_constraints_compute_schedule=no])
106 AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
107
108+ AC_MSG_CHECKING([Checking for isl_options_set_schedule_serialize_sccs])
109+ AC_TRY_LINK([#include <isl/schedule.h>],
110+ [isl_options_set_schedule_serialize_sccs (NULL, 0);],
111+ [ac_has_isl_options_set_schedule_serialize_sccs=yes],
112+ [ac_has_isl_options_set_schedule_serialize_sccs=no])
113+ AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
114+
115 LIBS="$saved_LIBS"
116 CFLAGS="$saved_CFLAGS"
117
118@@ -5554,6 +5563,11 @@
119 AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
120 [Define if isl_schedule_constraints_compute_schedule exists.])
121 fi
122+
123+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
124+ AC_DEFINE(HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS, 1,
125+ [Define if isl_options_set_schedule_serialize_sccs exists.])
126+ fi
127 fi
128
129
130diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
131index 50fe73e..9a0986d 100644
132--- a/gcc/graphite-dependences.c
133+++ b/gcc/graphite-dependences.c
134@@ -205,7 +205,7 @@ scop_get_transformed_schedule (scop_p scop, vec<poly_bb_p> pbbs)
135 /* Helper function used on each MAP of a isl_union_map. Computes the
136 maximal output dimension. */
137
138-static int
139+static isl_stat
140 max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
141 {
142 int global_max = *((int *) user);
143@@ -217,7 +217,7 @@ max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
144
145 isl_map_free (map);
146 isl_space_free (space);
147- return 0;
148+ return isl_stat_ok;
149 }
150
151 /* Extends the output dimension of MAP to MAX dimensions. */
152@@ -241,12 +241,12 @@ struct extend_schedule_str {
153
154 /* Helper function for extend_schedule. */
155
156-static int
157+static isl_stat
158 extend_schedule_1 (__isl_take isl_map *map, void *user)
159 {
160 struct extend_schedule_str *str = (struct extend_schedule_str *) user;
161 str->umap = isl_union_map_add_map (str->umap, extend_map (map, str->max));
162- return 0;
163+ return isl_stat_ok;
164 }
165
166 /* Return a relation that has uniform output dimensions. */
167@@ -255,16 +255,16 @@ __isl_give isl_union_map *
168 extend_schedule (__isl_take isl_union_map *x)
169 {
170 int max = 0;
171- int res;
172+ isl_stat res;
173 struct extend_schedule_str str;
174
175 res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
176- gcc_assert (res == 0);
177+ gcc_assert (res == isl_stat_ok);
178
179 str.max = max;
180 str.umap = isl_union_map_empty (isl_union_map_get_space (x));
181 res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
182- gcc_assert (res == 0);
183+ gcc_assert (res == isl_stat_ok);
184
185 isl_union_map_free (x);
186 return str.umap;
187diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
188index f490401..388e25c 100644
189--- a/gcc/graphite-optimize-isl.c
190+++ b/gcc/graphite-optimize-isl.c
191@@ -506,13 +506,13 @@ getScheduleMap (isl_schedule *Schedule, isl_union_map **map_sepcl)
192 return ScheduleMap;
193 }
194
195-static int
196+static isl_stat
197 getSingleMap (__isl_take isl_map *map, void *user)
198 {
199 isl_map **singleMap = (isl_map **) user;
200 *singleMap = map;
201
202- return 0;
203+ return isl_stat_ok;
204 }
205
206 static void
207@@ -584,7 +584,11 @@ optimize_isl (scop_p scop)
208
209 isl_options_set_schedule_max_constant_term (scop->ctx, CONSTANT_BOUND);
210 isl_options_set_schedule_maximize_band_depth (scop->ctx, 1);
211+#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
212+ isl_options_set_schedule_serialize_sccs (scop->ctx, 1);
213+#else
214 isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN);
215+#endif
216 isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_CONTINUE);
217
218 #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
219diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
220index 7ffd18e..7022a1d 100644
221--- a/gcc/graphite-poly.h
222+++ b/gcc/graphite-poly.h
223@@ -24,6 +24,11 @@ along with GCC; see the file COPYING3. If not see
224
225 #include "sese.h"
226
227+#ifndef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
228+# define isl_stat int
229+# define isl_stat_ok 0
230+#endif
231+
232 typedef struct poly_dr *poly_dr_p;
233
234 typedef struct poly_bb *poly_bb_p;
235--
2362.4.4
237
This page took 0.068119 seconds and 4 git commands to generate.