This is something I had lying around since late stage4, re-checked
and pushed now.

Richard.


This moves ISL system header includes to system.h.

        * system.h (INCLUDE_ISL): New guarded include.
        * graphite-dependences.c: Use it.
        * graphite-isl-ast-to-gimple.c: Likewise.
        * graphite-optimize-isl.c: Likewise.
        * graphite-poly.c: Likewise.
        * graphite-scop-detection.c: Likewise.
        * graphite-sese-to-poly.c: Likewise.
        * graphite.c: Likewise.
        * graphite.h: Drop the includes here.
---
 gcc/graphite-dependences.c       |  2 +-
 gcc/graphite-isl-ast-to-gimple.c |  2 +-
 gcc/graphite-optimize-isl.c      |  2 +-
 gcc/graphite-poly.c              |  2 +-
 gcc/graphite-scop-detection.c    |  2 +-
 gcc/graphite-sese-to-poly.c      | 11 +----------
 gcc/graphite.c                   |  2 +-
 gcc/graphite.h                   | 16 ----------------
 gcc/system.h                     | 23 +++++++++++++++++++++--
 9 files changed, 28 insertions(+), 34 deletions(-)

diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index 7078c949800..b8480217e6d 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define USES_ISL
+#define INCLUDE_ISL
 
 #include "config.h"
 
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index ef93fda2233..81f7b48887c 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define USES_ISL
+#define INCLUDE_ISL
 
 #include "config.h"
 
diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
index 0ca3c4fab2c..f9043f0aeed 100644
--- a/gcc/graphite-optimize-isl.c
+++ b/gcc/graphite-optimize-isl.c
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define USES_ISL
+#define INCLUDE_ISL
 
 #include "config.h"
 
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 42acffc0c5f..de32ab648ef 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define USES_ISL
+#define INCLUDE_ISL
 
 #include "config.h"
 
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 75f81227f8a..31f837c11b1 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define USES_ISL
+#define INCLUDE_ISL
 
 #include "config.h"
 
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index c42415e0554..afce6f0eb70 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define USES_ISL
+#define INCLUDE_ISL
 
 #include "config.h"
 
@@ -46,15 +46,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-scalar-evolution.h"
 #include "domwalk.h"
 #include "tree-ssa-propagate.h"
-
-#include <isl/constraint.h>
-#include <isl/set.h>
-#include <isl/map.h>
-#include <isl/union_map.h>
-#include <isl/constraint.h>
-#include <isl/aff.h>
-#include <isl/val.h>
-
 #include "graphite.h"
 
 /* Return an isl identifier for the polyhedral basic block PBB.  */
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 27f1e486e1f..1c702d09500 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -27,7 +27,7 @@ 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
+#define INCLUDE_ISL
 
 #include "config.h"
 #include "system.h"
diff --git a/gcc/graphite.h b/gcc/graphite.h
index 3fe1345cf96..8c06b81e32d 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -23,22 +23,6 @@ along with GCC; see the file COPYING3.  If not see
 #define GCC_GRAPHITE_POLY_H
 
 #include "sese.h"
-#include <isl/options.h>
-#include <isl/ctx.h>
-#include <isl/val.h>
-#include <isl/set.h>
-#include <isl/union_set.h>
-#include <isl/map.h>
-#include <isl/union_map.h>
-#include <isl/aff.h>
-#include <isl/constraint.h>
-#include <isl/flow.h>
-#include <isl/ilp.h>
-#include <isl/schedule.h>
-#include <isl/ast_build.h>
-#include <isl/schedule_node.h>
-#include <isl/id.h>
-#include <isl/space.h>
 
 typedef struct poly_dr *poly_dr_p;
 
diff --git a/gcc/system.h b/gcc/system.h
index 544f7ba427f..5f740e3b82b 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -736,6 +736,27 @@ extern int vsnprintf (char *, size_t, const char *, 
va_list);
 #endif
 #endif
 
+#ifdef INCLUDE_ISL
+#ifdef HAVE_isl
+#include <isl/options.h>
+#include <isl/ctx.h>
+#include <isl/val.h>
+#include <isl/set.h>
+#include <isl/union_set.h>
+#include <isl/map.h>
+#include <isl/union_map.h>
+#include <isl/aff.h>
+#include <isl/constraint.h>
+#include <isl/flow.h>
+#include <isl/ilp.h>
+#include <isl/schedule.h>
+#include <isl/ast_build.h>
+#include <isl/schedule_node.h>
+#include <isl/id.h>
+#include <isl/space.h>
+#endif
+#endif
+
 /* Redefine abort to report an internal error w/o coredump, and
    reporting the location of the error in the source file.  */
 extern void fancy_abort (const char *, int, const char *)
@@ -866,12 +887,10 @@ extern void fancy_abort (const char *, int, const char *)
    etc don't spuriously fail.  */
 #ifdef IN_GCC
 
-#ifndef USES_ISL
 #undef calloc
 #undef strdup
 #undef strndup
  #pragma GCC poison calloc strdup strndup
-#endif
 
 #if !defined(FLEX_SCANNER) && !defined(YYBISON)
 #undef malloc
-- 
2.25.1

Reply via email to