Re: PING for build part – Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-12-01 Thread Richard Biener
On Sun, Nov 30, 2014 at 2:19 PM, Tobias Burnus bur...@net-b.de wrote:
 PING for https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03281.html

 Only the build changes have still to be reviewed; the Graphite part is
 already approved – as is the loosely related follow-up patch.

Ok.

Thanks,
Richard.

 Tobias Burnus wrote:

 This patch adds a configure check for
 isl_schedule_constraints_compute_schedule,
 which is new in ISL 0.13 - and uses it for conditional compilation.

 The graphite*c patch is based on the one of Jack Howarth,
 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00906.html - without
 checking
 whether the ISL replacements make sense.

 With the patch, I have successfully bootstrapped GCC with ISL 0.12.2 and
 ISL 0.14 (both using an in-tree build).  [I still have to regtest the two
 variants and I also want to do a system-ISL built with ISL 0.12.2]

 Is the patch OK for the trunk?

 Tobias




PING for build part – Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-30 Thread Tobias Burnus

PING for https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03281.html

Only the build changes have still to be reviewed; the Graphite part is 
already approved – as is the loosely related follow-up patch.


Tobias Burnus wrote:

This patch adds a configure check for isl_schedule_constraints_compute_schedule,
which is new in ISL 0.13 - and uses it for conditional compilation.

The graphite*c patch is based on the one of Jack Howarth,
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00906.html - without checking
whether the ISL replacements make sense.

With the patch, I have successfully bootstrapped GCC with ISL 0.12.2 and
ISL 0.14 (both using an in-tree build).  [I still have to regtest the two
variants and I also want to do a system-ISL built with ISL 0.12.2]

Is the patch OK for the trunk?

Tobias




Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-27 Thread Jack Howarth
   This patch bootstraps fine on x86_64-apple-darwin14 against isl
0.14 at r218098.
  Jack

On Wed, Nov 26, 2014 at 10:55 AM, Tobias Burnus
tobias.bur...@physik.fu-berlin.de wrote:
 This patch adds a configure check for 
 isl_schedule_constraints_compute_schedule,
 which is new in ISL 0.13 - and uses it for conditional compilation.

 The graphite*c patch is based on the one of Jack Howarth,
 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00906.html - without checking
 whether the ISL replacements make sense.

 With the patch, I have successfully bootstrapped GCC with ISL 0.12.2 and
 ISL 0.14 (both using an in-tree build).  [I still have to regtest the two
 variants and I also want to do a system-ISL built with ISL 0.12.2]

 Is the patch OK for the trunk?

 Tobias

 PS: I'd be happy if some others could run additional tests.

 PPS: If the patch is in, can someone put ISL 0.14 to infrastructure? Then
 one can update contrib/download_prerequisites - such that the graphite
 failure is at least fixed for in-tree builds (cf. PR64017, PR62289).


[Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-26 Thread Tobias Burnus
This patch adds a configure check for isl_schedule_constraints_compute_schedule,
which is new in ISL 0.13 - and uses it for conditional compilation.

The graphite*c patch is based on the one of Jack Howarth,
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00906.html - without checking
whether the ISL replacements make sense.

With the patch, I have successfully bootstrapped GCC with ISL 0.12.2 and
ISL 0.14 (both using an in-tree build).  [I still have to regtest the two
variants and I also want to do a system-ISL built with ISL 0.12.2]

Is the patch OK for the trunk?

Tobias

PS: I'd be happy if some others could run additional tests.

PPS: If the patch is in, can someone put ISL 0.14 to infrastructure? Then
one can update contrib/download_prerequisites - such that the graphite
failure is at least fixed for in-tree builds (cf. PR64017, PR62289).
2014-11-26  Tobias Burnus  bur...@net-b.de
	Jack Howarth  howa...@bromo.med.uc.edu

	PR middle-end/64017
	* configure.ac (ac_has_isl_schedule_constraints_compute_schedule):
	New check.
	* doc/install.texi (ISL): Permit ISL 0.14.
	* graphite-optimize-isl.c (getScheduleForBandList, optimize_isl):
	Conditionally use ISL 0.13+ functions.
	* graphite-interchange.c: Make 'extern C' conditional.
	* graphite-isl-ast-to-gimple.c: Ditto.
	* graphite-poly.c: Ditto.
	* graphite-sese-to-poly.c: Ditto.
	* config.in: Regenerate.
	* gcc/configure: Regenerate.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index 2293fb8..48c8000 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5601,6 +5601,30 @@ if test x${ISLLIBS} != x ; then
AC_DEFINE(HAVE_isl, 1, [Define if isl is in use.])
 fi
 
+# Check whether isl_schedule_constraints_compute_schedule is available;
+# it's new in ISL-0.13.
+if test x${ISLLIBS} != x ; then
+  saved_CFLAGS=$CFLAGS
+  CFLAGS=$CFLAGS $ISLINC
+  saved_LIBS=$LIBS
+  LIBS=$LIBS $ISLLIBS $GMPLIBS
+
+  AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
+  AC_TRY_LINK([#include isl/schedule.h],
+  [isl_schedule_constraints_compute_schedule (NULL);],
+  [ac_has_isl_schedule_constraints_compute_schedule=yes],
+  [ac_has_isl_schedule_constraints_compute_schedule=no])
+  AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
+
+  LIBS=$saved_LIBS
+  CFLAGS=$saved_CFLAGS
+
+  if test x$ac_has_isl_schedule_constraints_compute_schedule = xyes; then
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
+   [Define if isl_schedule_constraints_compute_schedule exists.])
+  fi
+fi
+
 GCC_ENABLE_PLUGINS
 AC_SUBST(pluginlibs)
 AC_SUBST(enable_plugin)
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index e9ea4a2..1fbef63 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -383,7 +383,7 @@ installed but it is not in your default library search path, the
 @option{--with-mpc} configure option should be used.  See also
 @option{--with-mpc-lib} and @option{--with-mpc-include}.
 
-@item ISL Library version 0.12.2
+@item ISL Library version 0.14 (or 0.12.2)
 
 Necessary to build GCC with the Graphite loop optimizations.
 It can be downloaded from @uref{ftp://gcc.gnu.org/pub/gcc/infrastructure/}
diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c
index 81ba391..9f30d24 100644
--- a/gcc/graphite-interchange.c
+++ b/gcc/graphite-interchange.c
@@ -30,11 +30,13 @@ along with GCC; see the file COPYING3.  If not see
 #include isl/union_map.h
 #include isl/ilp.h
 #include isl/val.h
-#if defined(__cplusplus)
+
+/* 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 isl/val_gmp.h
-#if defined(__cplusplus)
+#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE)  defined(__cplusplus)
 }
 #endif
 #endif
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index bbf3055..456b24e 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -25,11 +25,13 @@ along with GCC; see the file COPYING3.  If not see
 #include isl/map.h
 #include isl/union_map.h
 #include isl/ast_build.h
-#if defined(__cplusplus)
+
+/* 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 isl/val_gmp.h
-#if defined(__cplusplus)
+#if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE)  defined(__cplusplus)
 }
 #endif
 #endif
diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
index 195101a..4cce700 100644
--- a/gcc/graphite-optimize-isl.c
+++ b/gcc/graphite-optimize-isl.c
@@ -460,7 +460,11 @@ getScheduleForBandList (isl_band_list *BandList, isl_union_map **map_sepcl)
 	  if (flag_loop_unroll_jam  (i != (ScheduleDimensions - depth)))
 		continue;
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+	  if (isl_band_member_is_coincident (Band, i))
+#else
 	  if 

Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-26 Thread Tobias Grosser

On 26.11.2014 16:55, Tobias Burnus wrote:

This patch adds a configure check for isl_schedule_constraints_compute_schedule,
which is new in ISL 0.13 - and uses it for conditional compilation.

The graphite*c patch is based on the one of Jack Howarth,
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00906.html - without checking
whether the ISL replacements make sense.

With the patch, I have successfully bootstrapped GCC with ISL 0.12.2 and
ISL 0.14 (both using an in-tree build).  [I still have to regtest the two
variants and I also want to do a system-ISL built with ISL 0.12.2]

Is the patch OK for the trunk?

Tobias

PS: I'd be happy if some others could run additional tests.

PPS: If the patch is in, can someone put ISL 0.14 to infrastructure? Then
one can update contrib/download_prerequisites - such that the graphite
failure is at least fixed for in-tree builds (cf. PR64017, PR62289).


That looks good from the graphite site.

Cheers,
Tobias


Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-26 Thread Tobias Burnus
On Wed, Nov 26, 2014 at 04:55:40PM +0100, Tobias Burnus wrote:
 This patch adds a configure check for 
 isl_schedule_constraints_compute_schedule,
 which is new in ISL 0.13 - and uses it for conditional compilation.

Repeating the test on a massively multicore system, it fails at stage2 with an
in-tree 0.14 because -lisl cannot be found at gcc/configure time. Hence,
HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE is false and one gets later an
error because a 0.12.2 function is not available with ISL 0.14.

However, running the configure test case manually - or building with fewer
cores - works. As does removing gcc after the failure such that isl/ is
available.  Thus, it looks like a dependency problem.

It seems to be fixed by the attached patch.
OK for the trunk?

Tobias
2014-11-26  Tobias Burnus  bur...@net-b.de

	PR middle-end/64017
	* Makefile.def: Make more dependent on mpfr, mpc and isl.
	* Makefile.in: Regenerate.

diff --git a/Makefile.def b/Makefile.def
index ddcbf5b..7c8761a 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -308,6 +308,9 @@ dependencies = { module=all-build-libcpp; on=all-build-libiberty; };
 // Host modules specific to gcc.
 dependencies = { module=configure-gcc; on=configure-intl; };
 dependencies = { module=configure-gcc; on=all-gmp; };
+dependencies = { module=configure-gcc; on=all-mpfr; };
+dependencies = { module=configure-gcc; on=all-mpc; };
+dependencies = { module=configure-gcc; on=all-isl; };
 dependencies = { module=configure-gcc; on=all-lto-plugin; };
 dependencies = { module=configure-gcc; on=all-binutils; };
 dependencies = { module=configure-gcc; on=all-gas; };
diff --git a/Makefile.in b/Makefile.in
index 02d914c..182e1fd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -48094,6 +48094,30 @@ configure-stage3-gcc: maybe-all-stage3-gmp
 configure-stage4-gcc: maybe-all-stage4-gmp
 configure-stageprofile-gcc: maybe-all-stageprofile-gmp
 configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
+configure-gcc: maybe-all-mpfr
+
+configure-stage1-gcc: maybe-all-stage1-mpfr
+configure-stage2-gcc: maybe-all-stage2-mpfr
+configure-stage3-gcc: maybe-all-stage3-mpfr
+configure-stage4-gcc: maybe-all-stage4-mpfr
+configure-stageprofile-gcc: maybe-all-stageprofile-mpfr
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
+configure-gcc: maybe-all-mpc
+
+configure-stage1-gcc: maybe-all-stage1-mpc
+configure-stage2-gcc: maybe-all-stage2-mpc
+configure-stage3-gcc: maybe-all-stage3-mpc
+configure-stage4-gcc: maybe-all-stage4-mpc
+configure-stageprofile-gcc: maybe-all-stageprofile-mpc
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpc
+configure-gcc: maybe-all-isl
+
+configure-stage1-gcc: maybe-all-stage1-isl
+configure-stage2-gcc: maybe-all-stage2-isl
+configure-stage3-gcc: maybe-all-stage3-isl
+configure-stage4-gcc: maybe-all-stage4-isl
+configure-stageprofile-gcc: maybe-all-stageprofile-isl
+configure-stagefeedback-gcc: maybe-all-stagefeedback-isl
 configure-gcc: maybe-all-lto-plugin
 
 configure-stage1-gcc: maybe-all-stage1-lto-plugin


Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-26 Thread Tobias Grosser

On 26.11.2014 17:27, Tobias Burnus wrote:

On Wed, Nov 26, 2014 at 04:55:40PM +0100, Tobias Burnus wrote:

This patch adds a configure check for isl_schedule_constraints_compute_schedule,
which is new in ISL 0.13 - and uses it for conditional compilation.


Repeating the test on a massively multicore system, it fails at stage2 with an
in-tree 0.14 because -lisl cannot be found at gcc/configure time. Hence,
HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE is false and one gets later an
error because a 0.12.2 function is not available with ISL 0.14.

However, running the configure test case manually - or building with fewer
cores - works. As does removing gcc after the failure such that isl/ is
available.  Thus, it looks like a dependency problem.

It seems to be fixed by the attached patch.
OK for the trunk?


OK from the graphite site. This needs a buildsystem OK though.

Tobias


Re: [Build, Graphite] PR64017 - support ISL-0.14 (gcc/configure.ac and gcc/graphite*.c)

2014-11-26 Thread Jeff Law

On 11/26/14 09:27, Tobias Burnus wrote:

On Wed, Nov 26, 2014 at 04:55:40PM +0100, Tobias Burnus wrote:

This patch adds a configure check for 
isl_schedule_constraints_compute_schedule,
which is new in ISL 0.13 - and uses it for conditional compilation.

Repeating the test on a massively multicore system, it fails at stage2 with an
in-tree 0.14 because -lisl cannot be found at gcc/configure time. Hence,
HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE is false and one gets later an
error because a 0.12.2 function is not available with ISL 0.14.

However, running the configure test case manually - or building with fewer
cores - works. As does removing gcc after the failure such that isl/ is
available.  Thus, it looks like a dependency problem.

It seems to be fixed by the attached patch.
OK for the trunk?

Tobias


g3.diff


2014-11-26  Tobias Burnusbur...@net-b.de

PR middle-end/64017
* Makefile.def: Make more dependent on mpfr, mpc and isl.
* Makefile.in: Regenerate.

This is OK for the trunk.

jeff