Link Here
|
|
|
1 |
diff -Naur src/gcc.orig/gcc/config.in src/gcc/gcc/config.in |
2 |
--- src/gcc.orig/gcc/config.in 2015-02-26 14:16:40.000000000 -0300 |
3 |
+++ src/gcc/gcc/config.in 2015-08-01 03:27:39.616665000 -0300 |
4 |
@@ -1217,6 +1217,12 @@ |
5 |
#endif |
6 |
|
7 |
|
8 |
+/* Define if isl_options_set_schedule_serialize_sccs exists. */ |
9 |
+#ifndef USED_FOR_TARGET |
10 |
+#undef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS |
11 |
+#endif |
12 |
+ |
13 |
+ |
14 |
/* Define if isl_schedule_constraints_compute_schedule exists. */ |
15 |
#ifndef USED_FOR_TARGET |
16 |
#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE |
17 |
diff -Naur src/gcc.orig/gcc/configure src/gcc/gcc/configure |
18 |
--- src/gcc.orig/gcc/configure 2015-02-26 14:16:40.000000000 -0300 |
19 |
+++ src/gcc/gcc/configure 2015-08-01 03:27:39.625522000 -0300 |
20 |
@@ -27888,6 +27888,8 @@ |
21 |
|
22 |
# Check whether isl_schedule_constraints_compute_schedule is available; |
23 |
# it's new in ISL-0.13. |
24 |
+# Check whether isl_options_set_schedule_serialize_sccs is available; |
25 |
+# it's new in ISL-0.15. |
26 |
saved_CFLAGS="$CFLAGS" |
27 |
CFLAGS="$CFLAGS $ISLINC" |
28 |
saved_LIBS="$LIBS" |
29 |
@@ -27916,6 +27918,29 @@ |
30 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5 |
31 |
$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; } |
32 |
|
33 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_options_set_schedule_serialize_sccs" >&5 |
34 |
+$as_echo_n "checking Checking for isl_options_set_schedule_serialize_sccs... " >&6; } |
35 |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
36 |
+/* end confdefs.h. */ |
37 |
+#include <isl/schedule.h> |
38 |
+int |
39 |
+main () |
40 |
+{ |
41 |
+isl_options_set_schedule_serialize_sccs (NULL, 0); |
42 |
+ ; |
43 |
+ return 0; |
44 |
+} |
45 |
+_ACEOF |
46 |
+if ac_fn_cxx_try_link "$LINENO"; then : |
47 |
+ ac_has_isl_options_set_schedule_serialize_sccs=yes |
48 |
+else |
49 |
+ ac_has_isl_options_set_schedule_serialize_sccs=no |
50 |
+fi |
51 |
+rm -f core conftest.err conftest.$ac_objext \ |
52 |
+ conftest$ac_exeext conftest.$ac_ext |
53 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5 |
54 |
+$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; } |
55 |
+ |
56 |
LIBS="$saved_LIBS" |
57 |
CFLAGS="$saved_CFLAGS" |
58 |
|
59 |
@@ -27924,6 +27949,12 @@ |
60 |
$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h |
61 |
|
62 |
fi |
63 |
+ |
64 |
+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then |
65 |
+ |
66 |
+$as_echo "#define HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS 1" >>confdefs.h |
67 |
+ |
68 |
+ fi |
69 |
fi |
70 |
|
71 |
|
72 |
diff -Naur src/gcc.orig/gcc/configure.ac src/gcc/gcc/configure.ac |
73 |
--- src/gcc.orig/gcc/configure.ac 2015-02-26 14:15:13.000000000 -0300 |
74 |
+++ src/gcc/gcc/configure.ac 2015-08-01 03:27:39.618893000 -0300 |
75 |
@@ -5506,6 +5506,8 @@ |
76 |
|
77 |
# Check whether isl_schedule_constraints_compute_schedule is available; |
78 |
# it's new in ISL-0.13. |
79 |
+ # Check whether isl_options_set_schedule_serialize_sccs is available; |
80 |
+ # it's new in ISL-0.15. |
81 |
saved_CFLAGS="$CFLAGS" |
82 |
CFLAGS="$CFLAGS $ISLINC" |
83 |
saved_LIBS="$LIBS" |
84 |
@@ -5518,6 +5520,13 @@ |
85 |
[ac_has_isl_schedule_constraints_compute_schedule=no]) |
86 |
AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule) |
87 |
|
88 |
+ AC_MSG_CHECKING([Checking for isl_options_set_schedule_serialize_sccs]) |
89 |
+ AC_TRY_LINK([#include <isl/schedule.h>], |
90 |
+ [isl_options_set_schedule_serialize_sccs (NULL, 0);], |
91 |
+ [ac_has_isl_options_set_schedule_serialize_sccs=yes], |
92 |
+ [ac_has_isl_options_set_schedule_serialize_sccs=no]) |
93 |
+ AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs) |
94 |
+ |
95 |
LIBS="$saved_LIBS" |
96 |
CFLAGS="$saved_CFLAGS" |
97 |
|
98 |
@@ -5525,6 +5534,11 @@ |
99 |
AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1, |
100 |
[Define if isl_schedule_constraints_compute_schedule exists.]) |
101 |
fi |
102 |
+ |
103 |
+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then |
104 |
+ AC_DEFINE(HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS, 1, |
105 |
+ [Define if isl_options_set_schedule_serialize_sccs exists.]) |
106 |
+ fi |
107 |
fi |
108 |
|
109 |
|
110 |
diff -Naur src/gcc.orig/gcc/graphite-dependences.c src/gcc/gcc/graphite-dependences.c |
111 |
--- src/gcc.orig/gcc/graphite-dependences.c 2014-10-06 03:27:22.000000000 -0300 |
112 |
+++ src/gcc/gcc/graphite-dependences.c 2015-08-01 03:27:39.626538000 -0300 |
113 |
@@ -183,7 +183,7 @@ |
114 |
/* Helper function used on each MAP of a isl_union_map. Computes the |
115 |
maximal output dimension. */ |
116 |
|
117 |
-static int |
118 |
+static isl_stat |
119 |
max_number_of_out_dimensions (__isl_take isl_map *map, void *user) |
120 |
{ |
121 |
int global_max = *((int *) user); |
122 |
@@ -195,7 +195,7 @@ |
123 |
|
124 |
isl_map_free (map); |
125 |
isl_space_free (space); |
126 |
- return 0; |
127 |
+ return isl_stat_ok; |
128 |
} |
129 |
|
130 |
/* Extends the output dimension of MAP to MAX dimensions. */ |
131 |
@@ -219,12 +219,12 @@ |
132 |
|
133 |
/* Helper function for extend_schedule. */ |
134 |
|
135 |
-static int |
136 |
+static isl_stat |
137 |
extend_schedule_1 (__isl_take isl_map *map, void *user) |
138 |
{ |
139 |
struct extend_schedule_str *str = (struct extend_schedule_str *) user; |
140 |
str->umap = isl_union_map_add_map (str->umap, extend_map (map, str->max)); |
141 |
- return 0; |
142 |
+ return isl_stat_ok; |
143 |
} |
144 |
|
145 |
/* Return a relation that has uniform output dimensions. */ |
146 |
@@ -233,16 +233,16 @@ |
147 |
extend_schedule (__isl_take isl_union_map *x) |
148 |
{ |
149 |
int max = 0; |
150 |
- int res; |
151 |
+ isl_stat res; |
152 |
struct extend_schedule_str str; |
153 |
|
154 |
res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max); |
155 |
- gcc_assert (res == 0); |
156 |
+ gcc_assert (res == isl_stat_ok); |
157 |
|
158 |
str.max = max; |
159 |
str.umap = isl_union_map_empty (isl_union_map_get_space (x)); |
160 |
res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str); |
161 |
- gcc_assert (res == 0); |
162 |
+ gcc_assert (res == isl_stat_ok); |
163 |
|
164 |
isl_union_map_free (x); |
165 |
return str.umap; |
166 |
diff -Naur src/gcc.orig/gcc/graphite-interchange.c src/gcc/gcc/graphite-interchange.c |
167 |
--- src/gcc.orig/gcc/graphite-interchange.c 2015-01-13 15:14:51.000000000 -0200 |
168 |
+++ src/gcc/gcc/graphite-interchange.c 2015-08-01 03:31:17.482630000 -0300 |
169 |
@@ -24,6 +24,7 @@ |
170 |
#include "config.h" |
171 |
|
172 |
#ifdef HAVE_cloog |
173 |
+#include <isl/constraint.h> |
174 |
#include <isl/aff.h> |
175 |
#include <isl/set.h> |
176 |
#include <isl/map.h> |
177 |
diff -Naur src/gcc.orig/gcc/graphite-optimize-isl.c src/gcc/gcc/graphite-optimize-isl.c |
178 |
--- src/gcc.orig/gcc/graphite-optimize-isl.c 2015-01-13 15:14:51.000000000 -0200 |
179 |
+++ src/gcc/gcc/graphite-optimize-isl.c 2015-08-01 03:31:43.271150000 -0300 |
180 |
@@ -21,7 +21,9 @@ |
181 |
#include "config.h" |
182 |
|
183 |
#ifdef HAVE_cloog |
184 |
+#include <isl/constraint.h> |
185 |
#include <isl/set.h> |
186 |
+#include <isl/union_set.h> |
187 |
#include <isl/map.h> |
188 |
#include <isl/union_map.h> |
189 |
#include <isl/schedule.h> |
190 |
@@ -415,13 +417,13 @@ |
191 |
return ScheduleMap; |
192 |
} |
193 |
|
194 |
-static int |
195 |
+static isl_stat |
196 |
getSingleMap (__isl_take isl_map *map, void *user) |
197 |
{ |
198 |
isl_map **singleMap = (isl_map **) user; |
199 |
*singleMap = map; |
200 |
|
201 |
- return 0; |
202 |
+ return isl_stat_ok; |
203 |
} |
204 |
|
205 |
static void |
206 |
@@ -469,7 +471,11 @@ |
207 |
|
208 |
isl_options_set_schedule_max_constant_term (scop->ctx, CONSTANT_BOUND); |
209 |
isl_options_set_schedule_maximize_band_depth (scop->ctx, 1); |
210 |
+#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS |
211 |
+ isl_options_set_schedule_serialize_sccs (scop->ctx, 1); |
212 |
+#else |
213 |
isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN); |
214 |
+#endif |
215 |
isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_CONTINUE); |
216 |
schedule = isl_union_set_compute_schedule (domain, validity, proximity); |
217 |
isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_ABORT); |
218 |
diff -Naur src/gcc.orig/gcc/graphite-poly.h src/gcc/gcc/graphite-poly.h |
219 |
--- src/gcc.orig/gcc/graphite-poly.h 2014-10-06 03:27:22.000000000 -0300 |
220 |
+++ src/gcc/gcc/graphite-poly.h 2015-08-01 03:27:39.628524000 -0300 |
221 |
@@ -22,6 +22,11 @@ |
222 |
#ifndef GCC_GRAPHITE_POLY_H |
223 |
#define GCC_GRAPHITE_POLY_H |
224 |
|
225 |
+#ifndef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS |
226 |
+# define isl_stat int |
227 |
+# define isl_stat_ok 0 |
228 |
+#endif |
229 |
+ |
230 |
typedef struct poly_dr *poly_dr_p; |
231 |
|
232 |
typedef struct poly_bb *poly_bb_p; |
233 |
diff -Naur src/gcc.orig/gcc/graphite-scop-detection.c src/gcc/gcc/graphite-scop-detection.c |
234 |
--- src/gcc.orig/gcc/graphite-scop-detection.c 2014-10-06 03:27:22.000000000 -0300 |
235 |
+++ src/gcc/gcc/graphite-scop-detection.c 2015-08-01 03:32:21.170581000 -0300 |
236 |
@@ -22,6 +22,7 @@ |
237 |
#include "config.h" |
238 |
|
239 |
#ifdef HAVE_cloog |
240 |
+#include <isl/constraint.h> |
241 |
#include <isl/set.h> |
242 |
#include <isl/map.h> |
243 |
#include <isl/union_map.h> |
244 |
diff -Naur src/gcc.orig/gcc/graphite.c src/gcc/gcc/graphite.c |
245 |
--- src/gcc.orig/gcc/graphite.c 2014-10-06 03:27:22.000000000 -0300 |
246 |
+++ src/gcc/gcc/graphite.c 2015-08-01 03:33:02.692021000 -0300 |
247 |
@@ -35,6 +35,7 @@ |
248 |
#include "config.h" |
249 |
|
250 |
#ifdef HAVE_cloog |
251 |
+#include <isl/constraint.h> |
252 |
#include <isl/set.h> |
253 |
#include <isl/map.h> |
254 |
#include <isl/options.h> |