Skip to content

Instantly share code, notes, and snippets.

@dunn
Created September 30, 2015 14:04
Show Gist options
  • Save dunn/45e431a32cb6a7f43305 to your computer and use it in GitHub Desktop.
Save dunn/45e431a32cb6a7f43305 to your computer and use it in GitHub Desktop.
diff --git a/gcc/config.in b/gcc/config.in
index f2ed301..db8d0ac 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1313,6 +1313,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 0037240..c87f080 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -28245,6 +28245,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_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ISLINC"
@@ -28274,6 +28276,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"
CFLAGS="$saved_CFLAGS"
@@ -28282,6 +28307,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 6f38ba1..ca426fc 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5693,6 +5693,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_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ISLINC"
@@ -5706,6 +5708,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"
CFLAGS="$saved_CFLAGS"
@@ -5713,6 +5722,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 dd3f03b..3d716be 100644
--- a/gcc/graphite-blocking.c
+++ b/gcc/graphite-blocking.c
@@ -24,6 +24,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index edd357d..f9d18a8 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -22,6 +22,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -227,7 +231,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);
@@ -239,7 +243,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. */
@@ -263,12 +267,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. */
@@ -277,16 +281,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 8c0d95d..18d565d 100644
--- a/gcc/graphite-interchange.c
+++ b/gcc/graphite-interchange.c
@@ -24,6 +24,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/aff.h>
#include <isl/set.h>
#include <isl/map.h>
@@ -202,9 +206,9 @@ pdr_stride_in_loop (mpz_t stride, graphite_dim_t depth, poly_dr_p pdr)
pbb->domain: [P1..nb_param,I1..nb_domain]
pbb->transformed: [P1..nb_param,I1..nb_domain]->[T1..Tnb_sctr]
[T] includes local vars (currently unused)
-
+
First we create [P,I] -> [T,a,S]. */
-
+
map = isl_map_flat_range_product (isl_map_copy (pbb->transformed),
isl_map_copy (pdr->accesses));
/* Add a dimension for L: [P,I] -> [T,a,S,L].*/
@@ -671,4 +675,3 @@ scop_do_interchange (scop_p scop)
#endif
-
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 90ce0c6..c97d963 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -21,7 +21,12 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
+#include <isl/union_set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/ast_build.h>
@@ -308,7 +313,7 @@ nary_op_to_tree (tree type, __isl_take isl_ast_expr *expr, ivs_params &ip)
break;
default:
- gcc_unreachable ();
+ gcc_unreachable ();
}
isl_ast_expr *arg_expr = isl_ast_expr_get_op_arg (expr, 0);
tree res = gcc_expression_from_isl_expression (type, arg_expr, ip);
@@ -559,7 +564,7 @@ graphite_create_new_loop_guard (edge entry_edge,
*lb = gcc_expression_from_isl_expression (*type, for_init, ip);
isl_ast_expr *upper_bound = get_upper_bound (node_for);
*ub = gcc_expression_from_isl_expression (*type, upper_bound, ip);
-
+
/* When ub is simply a constant or a parameter, use lb <= ub. */
if (TREE_CODE (*ub) == INTEGER_CST || TREE_CODE (*ub) == SSA_NAME)
cond_expr = fold_build2 (LE_EXPR, boolean_type_node, *lb, *ub);
@@ -603,7 +608,7 @@ translate_isl_ast_node_for (loop_p context_loop, __isl_keep isl_ast_node *node,
/* Inserts in iv_map a tuple (OLD_LOOP->num, NEW_NAME) for the induction
variables of the loops around GBB in SESE.
-
+
FIXME: Instead of using a vec<tree> that maps each loop id to a possible
chrec, we could consider using a map<int, tree> that maps loop ids to the
corresponding tree expressions. */
@@ -687,7 +692,7 @@ translate_isl_ast_node_block (loop_p context_loop,
isl_ast_node_list_free (node_list);
return next_e;
}
-
+
/* Creates a new if region corresponding to ISL's cond. */
static edge
@@ -760,7 +765,7 @@ translate_isl_ast (loop_p context_loop, __isl_keep isl_ast_node *node,
/* Prints NODE to FILE. */
void
-print_isl_ast_node (FILE *file, __isl_keep isl_ast_node *node,
+print_isl_ast_node (FILE *file, __isl_keep isl_ast_node *node,
__isl_keep isl_ctx *ctx)
{
isl_printer *prn = isl_printer_to_file (ctx, file);
@@ -843,7 +848,7 @@ extend_schedule (__isl_take isl_map *schedule, int nb_schedule_dims)
/* Set the separation_class option for unroll and jam. */
static __isl_give isl_union_map *
-generate_luj_sepclass_opt (scop_p scop, __isl_take isl_union_set *domain,
+generate_luj_sepclass_opt (scop_p scop, __isl_take isl_union_set *domain,
int dim, int cl)
{
isl_map *map;
@@ -851,7 +856,7 @@ generate_luj_sepclass_opt (scop_p scop, __isl_take isl_union_set *domain,
isl_ctx *ctx;
isl_union_map *mapu;
int nsched = get_max_schedule_dimensions (scop);
-
+
ctx = scop->ctx;
space_sep = isl_space_alloc (ctx, 0, 1, 1);
space_sep = isl_space_wrap (space_sep);
@@ -865,7 +870,7 @@ generate_luj_sepclass_opt (scop_p scop, __isl_take isl_union_set *domain,
isl_map_fix_si (map,isl_dim_out,0,dim);
isl_map_fix_si (map,isl_dim_out,1,cl);
- mapu = isl_union_map_intersect_domain (isl_union_map_from_map (map),
+ mapu = isl_union_map_intersect_domain (isl_union_map_from_map (map),
domain);
return (mapu);
}
@@ -904,7 +909,7 @@ generate_luj_sepclass (scop_p scop)
}
/* Set the AST built options for loop unroll and jam. */
-
+
static __isl_give isl_union_map *
generate_luj_options (scop_p scop)
{
@@ -987,7 +992,7 @@ set_options (__isl_take isl_ast_build *control,
range_space =
isl_space_set_tuple_name (range_space, isl_dim_set, "separate");
isl_union_set *range =
- isl_union_set_from_set (isl_set_universe (range_space));
+ isl_union_set_from_set (isl_set_universe (range_space));
isl_union_set *domain = isl_union_map_range (isl_union_map_copy (schedule));
domain = isl_union_set_universe (domain);
isl_union_map *options = isl_union_map_from_domain_and_range (domain, range);
diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
index 8bdf744..b35e5dd 100644
--- a/gcc/graphite-optimize-isl.c
+++ b/gcc/graphite-optimize-isl.c
@@ -21,7 +21,12 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
+#include <isl/union_set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/schedule.h>
@@ -84,32 +89,32 @@ scop_get_domains (scop_p scop ATTRIBUTE_UNUSED)
}
/* getTileMap - Create a map that describes a n-dimensonal tiling.
-
+
getTileMap creates a map from a n-dimensional scattering space into an
2*n-dimensional scattering space. The map describes a rectangular tiling.
-
+
Example:
scheduleDimensions = 2, parameterDimensions = 1, tileSize = 32
-
+
tileMap := [p0] -> {[s0, s1] -> [t0, t1, s0, s1]:
t0 % 32 = 0 and t0 <= s0 < t0 + 32 and
t1 % 32 = 0 and t1 <= s1 < t1 + 32}
-
+
Before tiling:
-
+
for (i = 0; i < N; i++)
for (j = 0; j < M; j++)
S(i,j)
-
+
After tiling:
-
+
for (t_i = 0; t_i < N; i+=32)
for (t_j = 0; t_j < M; j+=32)
for (i = t_i; i < min(t_i + 32, N); i++) | Unknown that N % 32 = 0
for (j = t_j; j < t_j + 32; j++) | Known that M % 32 = 0
S(i,j)
*/
-
+
static isl_basic_map *
getTileMap (isl_ctx *ctx, int scheduleDimensions, int tileSize)
{
@@ -175,7 +180,7 @@ getTileMap (isl_ctx *ctx, int scheduleDimensions, int tileSize)
}
/* getScheduleForBand - Get the schedule for this band.
-
+
Polly applies transformations like tiling on top of the isl calculated value.
This can influence the number of scheduling dimension. The number of
schedule dimensions is returned in the parameter 'Dimension'. */
@@ -212,14 +217,14 @@ getScheduleForBand (isl_band *Band, int *Dimensions)
}
/* Create a map that pre-vectorizes one scheduling dimension.
-
+
getPrevectorMap creates a map that maps each input dimension to the same
output dimension, except for the dimension DimToVectorize. DimToVectorize is
strip mined by 'VectorWidth' and the newly created point loop of
DimToVectorize is moved to the innermost level.
-
+
Example (DimToVectorize=0, ScheduleDimensions=2, VectorWidth=4):
-
+
| Before transformation
|
| A[i,j] -> [i,j]
@@ -227,10 +232,10 @@ getScheduleForBand (isl_band *Band, int *Dimensions)
| for (i = 0; i < 128; i++)
| for (j = 0; j < 128; j++)
| A(i,j);
-
+
Prevector map:
[i,j] -> [it,j,ip] : it % 4 = 0 and it <= ip <= it + 3 and i = ip
-
+
| After transformation:
|
| A[i,j] -> [it,j,ip] : it % 4 = 0 and it <= ip <= it + 3 and i = ip
@@ -239,11 +244,11 @@ getScheduleForBand (isl_band *Band, int *Dimensions)
| for (j = 0; j < 128; j++)
| for (ip = max(0,it); ip < min(128, it + 3); ip++)
| A(ip,j);
-
+
The goal of this transformation is to create a trivially vectorizable loop.
This means a parallel loop at the innermost level that has a constant number
of iterations corresponding to the target vector width.
-
+
This transformation creates a loop at the innermost level. The loop has a
constant number of iterations, if the number of loop iterations at
DimToVectorize can be devided by VectorWidth. The default VectorWidth is
@@ -317,8 +322,8 @@ getPrevectorMap (isl_ctx *ctx, int DimToVectorize,
return TilingMap;
}
-/* Compute an auxiliary map to getPrevectorMap, for computing the separating
- class defined by full tiles. Used in graphite_isl_ast_to_gimple.c to set the
+/* Compute an auxiliary map to getPrevectorMap, for computing the separating
+ class defined by full tiles. Used in graphite_isl_ast_to_gimple.c to set the
corresponding option for AST build.
The map (for VectorWidth=4):
@@ -328,8 +333,8 @@ getPrevectorMap (isl_ctx *ctx, int DimToVectorize,
The image of this map is the separation class. The range of this map includes
all the i multiple of 4 in the domain such as i + 3 is in the domain too.
-
- */
+
+ */
static isl_map *
getPrevectorMap_full (isl_ctx *ctx, int DimToVectorize,
int ScheduleDimensions,
@@ -354,7 +359,7 @@ getPrevectorMap_full (isl_ctx *ctx, int DimToVectorize,
PointDimension = ScheduleDimensions;
TileDimension = DimToVectorize;
- /* Create an identity map for everything except DimToVectorize and the
+ /* Create an identity map for everything except DimToVectorize and the
point loop. */
for (i = 0; i < ScheduleDimensions; i++)
{
@@ -412,7 +417,7 @@ getPrevectorMap_full (isl_ctx *ctx, int DimToVectorize,
static bool EnablePollyVector = false;
/* getScheduleForBandList - Get the scheduling map for a list of bands.
-
+
We walk recursively the forest of bands to combine the schedules of the
individual bands to the overall schedule. In case tiling is requested,
the individual bands are tiled.
@@ -459,9 +464,9 @@ getScheduleForBandList (isl_band_list *BandList, isl_union_map **map_sepcl)
{
int i;
int depth;
-
+
depth = PARAM_VALUE (PARAM_LOOP_UNROLL_JAM_DEPTH);
-
+
for (i = ScheduleDimensions - 1 ; i >= 0 ; i--)
{
if (flag_loop_unroll_jam && (i != (ScheduleDimensions - depth)))
@@ -477,10 +482,10 @@ getScheduleForBandList (isl_band_list *BandList, isl_union_map **map_sepcl)
isl_union_map *TileUMap;
int stride;
- stride = PARAM_VALUE (PARAM_LOOP_UNROLL_JAM_SIZE);
+ stride = PARAM_VALUE (PARAM_LOOP_UNROLL_JAM_SIZE);
- TileMap = getPrevectorMap_full (ctx, i, ScheduleDimensions,
- stride);
+ TileMap = getPrevectorMap_full (ctx, i, ScheduleDimensions,
+ stride);
TileUMap = isl_union_map_from_map (TileMap);
TileUMap = isl_union_map_align_params
(TileUMap, isl_space_copy (Space));
@@ -494,10 +499,10 @@ getScheduleForBandList (isl_band_list *BandList, isl_union_map **map_sepcl)
PartialSchedule = isl_union_map_apply_range
(PartialSchedule, TileUMap);
break;
- }
+ }
}
}
- Schedule = isl_union_map_union (Schedule,
+ Schedule = isl_union_map_union (Schedule,
isl_union_map_copy(PartialSchedule));
isl_band_free (Band);
@@ -530,13 +535,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
@@ -608,7 +613,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 ae90c29..37f30e3 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -22,6 +22,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -1220,4 +1224,3 @@ reverse_loop_for_pbbs (scop_p scop, vec<poly_bb_p> pbbs, int depth)
#endif
-
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index afc0121..7022a1d 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -22,6 +22,13 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_GRAPHITE_POLY_H
#define GCC_GRAPHITE_POLY_H
+#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 4512fe7..3a78e2d 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -22,6 +22,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
@@ -1295,7 +1299,7 @@ remove_duplicate_close_phi (gphi *phi, gphi_iterator *gsi)
SET_USE (use_p, res);
update_stmt (use_stmt);
-
+
/* It is possible that we just created a duplicate close-phi
for an already-processed containing loop. Check for this
case and clean it up. */
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 23b63ad..fc58937 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -21,6 +21,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
diff --git a/gcc/graphite.c b/gcc/graphite.c
index c8f0617..bc98fe8 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -35,6 +35,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#ifdef HAVE_isl
+/* Workaround for GMP 5.1.3 bug, see PR56019. */
+#include <stddef.h>
+
+#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/options.h>
@@ -427,5 +431,3 @@ make_pass_graphite_transforms (gcc::context *ctxt)
{
return new pass_graphite_transforms (ctxt);
}
-
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment