From: Michael Matz <matz@suse.de>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Speedup configure and build with system.h
Date: Fri, 22 Jan 2016 16:59:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.20.1601221744160.25099@wotan.suse.de> (raw)
In-Reply-To: <CAFiYyc3goTGZPN2KdxT4n=DJakcM00eTkngWpqS5RAS6ve6vyQ@mail.gmail.com>
Hi,
On Thu, 21 Jan 2016, Richard Biener wrote:
> I'm inclined to say #define INCLUDE_ALGORITHM is a better name,
I've done this. On a different (slower) machine than the one from the
initial mail:
without patch, -j31 bootstrap all,ada:
real 35m2.655s
user 395m28.135s
sys 12m10.814s
with patch, -j31 bootstrap all,ada:
real 31m45.942s
user 364m17.566s
sys 11m1.173s
So, even real-time savings of 3 minutes with a -j31 build; I'll take that
:)
> and please convert the (bogus) ISL way of achieving a similar thing.
But I've not done this, as I'm not too satisfied with the result. See
below; we get rid of the small USES_ISL condition around poisoning
calloc/strdup, but pay with it for a larger include block in system.h and
the fact that now any changes to the ISL include list result in a
recompilation of everything as system.h, not just graphite.h is changed.
We'd trade a small hack with a larger one for policy reasons. Let me know
if you think it's nevertheless better.
Ciao,
Michael.
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index 0544700..dabc0b9 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 562cee0..8108227 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 fe8a71a..170e535 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 efa39bf..a3f8ada 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 d026d4f..cea629b 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 92ab2f9..a46b63c 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"
@@ -47,16 +47,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 <isl/val_gmp.h>
-
#include "graphite.h"
/* Assigns to RES the value of the INTEGER_CST T. */
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 3236006..c85823d 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 2f36ded..30c4d2c 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -23,29 +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_gmp.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>
-
-#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
-/* isl 0.15 or later. */
-#include <isl/schedule_node.h>
-
-#else
-/* isl 0.14 or 0.13. */
-# define isl_stat int
-# define isl_stat_ok 0
-#endif
typedef struct poly_dr *poly_dr_p;
diff --git a/gcc/system.h b/gcc/system.h
index 8151e0a..d5b2f85 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -669,6 +669,31 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
#include <gmp.h>
#endif
+#if defined(INCLUDE_ISL) && defined (HAVE_isl)
+#include <isl/options.h>
+#include <isl/ctx.h>
+#include <isl/val_gmp.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>
+
+#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
+/* isl 0.15 or later. */
+#include <isl/schedule_node.h>
+#else
+/* isl 0.14 or 0.13. */
+# define isl_stat int
+# define isl_stat_ok 0
+#endif
+#endif
+
/* Get libiberty declarations. */
#include "libiberty.h"
@@ -803,12 +828,9 @@ 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
next prev parent reply other threads:[~2016-01-22 16:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 16:57 Michael Matz
2016-01-21 17:10 ` Richard Biener
2016-01-22 12:02 ` Oleg Endo
2016-01-22 13:49 ` Michael Matz
2016-01-22 16:59 ` Michael Matz [this message]
2016-01-22 20:09 ` H.J. Lu
2016-01-22 20:23 ` Jakub Jelinek
2016-01-22 22:15 ` Jakub Jelinek
2016-01-23 7:30 ` Richard Biener
2016-01-25 12:38 ` Michael Matz
2016-01-25 12:14 Uros Bizjak
2016-01-25 13:53 ` Michael Matz
2016-01-25 14:02 ` Richard Biener
2016-01-26 10:02 ` Uros Bizjak
2016-01-26 16:35 ` Michael Matz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.20.1601221744160.25099@wotan.suse.de \
--to=matz@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).