diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index aef29acfb3a..3f4e5ea8fe6 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-dependences.c @@ -19,18 +19,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define USES_ISL + #include "config.h" #ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include - -#include -#include -#include -#include -#include -#include #include "system.h" #include "coretypes.h" @@ -44,6 +37,14 @@ along with GCC; see the file COPYING3. If not see #include "tree-pass.h" #include "cfgloop.h" #include "tree-data-ref.h" + +#include +#include +#include +#include +#include +#include + #include "graphite-poly.h" diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 557c44cf10b..b13aa128a1e 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -18,27 +18,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define USES_ISL + #include "config.h" #ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include - -#include -#include -#include -#include -#include -#include - -/* Since ISL-0.13, the extern is in val_gmp.h. */ -#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) -extern "C" { -#endif -#include -#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) -} -#endif #include "system.h" #include "coretypes.h" @@ -59,19 +43,36 @@ extern "C" { #include "tree-pass.h" #include "cfgloop.h" #include "tree-data-ref.h" -#include "graphite-poly.h" #include "tree-ssa-loop-manip.h" #include "tree-scalar-evolution.h" #include "gimple-ssa.h" #include "tree-phinodes.h" #include "tree-into-ssa.h" #include "ssa-iterators.h" -#include "graphite-isl-ast-to-gimple.h" #include "tree-cfg.h" #include "gimple-pretty-print.h" #include "cfganal.h" #include "value-prof.h" +#include +#include +#include +#include +#include +#include + +/* Since ISL-0.13, the extern is in val_gmp.h. */ +#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) +extern "C" { +#endif +#include +#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) +} +#endif + +#include "graphite-poly.h" +#include "graphite-isl-ast-to-gimple.h" + #include /* We always try to use signed 128 bit types, but fall back to smaller types diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c index c09264bf093..6ae224fd53a 100644 --- a/gcc/graphite-optimize-isl.c +++ b/gcc/graphite-optimize-isl.c @@ -18,11 +18,25 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define USES_ISL + #include "config.h" #ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include + +#include "system.h" +#include "coretypes.h" +#include "backend.h" +#include "cfghooks.h" +#include "tree.h" +#include "gimple.h" +#include "fold-const.h" +#include "gimple-iterator.h" +#include "tree-ssa-loop.h" +#include "cfgloop.h" +#include "tree-data-ref.h" +#include "params.h" +#include "dumpfile.h" #include #include @@ -38,20 +52,7 @@ along with GCC; see the file COPYING3. If not see #include #endif -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "cfghooks.h" -#include "tree.h" -#include "gimple.h" -#include "fold-const.h" -#include "gimple-iterator.h" -#include "tree-ssa-loop.h" -#include "cfgloop.h" -#include "tree-data-ref.h" #include "graphite-poly.h" -#include "params.h" -#include "dumpfile.h" #ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 809670ab330..9137cc43b34 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -19,11 +19,25 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define USES_ISL + #include "config.h" #ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include + +#include "system.h" +#include "coretypes.h" +#include "backend.h" +#include "tree.h" +#include "gimple.h" +#include "cfghooks.h" +#include "gimple-pretty-print.h" +#include "diagnostic-core.h" +#include "fold-const.h" +#include "gimple-iterator.h" +#include "tree-ssa-loop.h" +#include "cfgloop.h" +#include "tree-data-ref.h" #include #include @@ -43,19 +57,6 @@ extern "C" { } #endif -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "tree.h" -#include "gimple.h" -#include "cfghooks.h" -#include "gimple-pretty-print.h" -#include "diagnostic-core.h" -#include "fold-const.h" -#include "gimple-iterator.h" -#include "tree-ssa-loop.h" -#include "cfgloop.h" -#include "tree-data-ref.h" #include "graphite-poly.h" #define OPENSCOP_MAX_STRING 256 diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 84fe945e74a..60bb0499f08 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -19,16 +19,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define USES_ISL + #include "config.h" #ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include - -#include -#include -#include -#include #include "system.h" #include "coretypes.h" @@ -51,11 +46,17 @@ along with GCC; see the file COPYING3. If not see #include "tree-data-ref.h" #include "tree-scalar-evolution.h" #include "tree-pass.h" -#include "graphite-poly.h" #include "tree-ssa-propagate.h" -#include "graphite-scop-detection.h" #include "gimple-pretty-print.h" +#include +#include +#include +#include + +#include "graphite-poly.h" +#include "graphite-scop-detection.h" + class debug_printer { private: diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 83acc4ac6ca..34aa4763c41 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -18,28 +18,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define USES_ISL + #include "config.h" #ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include - -#include -#include -#include -#include -#include -#include -#include - -/* Since ISL-0.13, the extern is in val_gmp.h. */ -#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) -extern "C" { -#endif -#include -#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) -} -#endif #include "system.h" #include "coretypes.h" @@ -63,8 +46,26 @@ extern "C" { #include "tree-data-ref.h" #include "tree-scalar-evolution.h" #include "domwalk.h" -#include "graphite-poly.h" #include "tree-ssa-propagate.h" + +#include +#include +#include +#include +#include +#include +#include + +/* Since ISL-0.13, the extern is in val_gmp.h. */ +#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) +extern "C" { +#endif +#include +#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) +} +#endif + +#include "graphite-poly.h" #include "graphite-sese-to-poly.h" /* Assigns to RES the value of the INTEGER_CST T. */ diff --git a/gcc/graphite.c b/gcc/graphite.c index 5316bc4fa7d..c2efdc95925 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -27,19 +27,9 @@ along with GCC; see the file COPYING3. If not see The wiki page http://gcc.gnu.org/wiki/Graphite contains pointers to the related work. */ +#define USES_ISL + #include "config.h" - -#ifdef HAVE_isl -/* Workaround for GMP 5.1.3 bug, see PR56019. */ -#include - -#include -#include -#include -#include -#include -#endif - #include "system.h" #include "coretypes.h" #include "backend.h" @@ -59,10 +49,17 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-loop.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" -#include "graphite-poly.h" #include "dbgcnt.h" #include "tree-parloops.h" #include "tree-cfgcleanup.h" + +#include +#include +#include +#include +#include + +#include "graphite-poly.h" #include "graphite-scop-detection.h" #include "graphite-isl-ast-to-gimple.h" #include "graphite-sese-to-poly.h" diff --git a/gcc/system.h b/gcc/system.h index ed3de9f1c7f..498596f7fef 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -798,9 +798,12 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; compiling gcc, so that the autoconf declaration tests for malloc etc don't spuriously fail. */ #ifdef IN_GCC + +#ifndef USES_ISL #undef calloc #undef strdup #pragma GCC poison calloc strdup +#endif #if !defined(FLEX_SCANNER) && !defined(YYBISON) #undef malloc