Skip to content

Commit

Permalink
fix PR68343: disable fuse-*.c tests for isl 0.14 or earlier
Browse files Browse the repository at this point in the history
The patch disables all fuse-*.c tests when configuring gcc with isl 0.14 or earlier.

ChangeLog:

	* Makefile.in: Regenerate.
	* Makefile.tpl: Export ISLVER.
	* configure: Regenerate.
	* config/isl.m4: Detect isl-0.15.

gcc/

	* Makefile.in: Set ISLVER in site.exp.

gcc/testsuite/

	* gcc.dg/graphite/graphite.exp: Only run the fuse-*.c tests with isl-0.15.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232811 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
spop committed Jan 26, 2016
1 parent c699f6a commit 45fc524
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2016-01-25 Aditya Kumar <[email protected]>
Sebastian Pop <[email protected]>

* Makefile.in: Regenerate.
* Makefile.tpl: Export ISLVER.
* configure: Regenerate.
* config/isl.m4: Detect isl-0.15.

2016-01-24 Mikhail Maltsev <[email protected]>

PR bootstrap/69329
Expand Down
2 changes: 2 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ HOST_EXPORTS = \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
ISLVER="$(HOST_ISLVER)"; export ISLVER; \
LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \
XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \
Expand Down Expand Up @@ -315,6 +316,7 @@ HOST_GMPINC = @gmpinc@
# Where to find isl
HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
HOST_ISLVER = @islver@

# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
Expand Down
2 changes: 2 additions & 0 deletions Makefile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ HOST_EXPORTS = \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
ISLVER="$(HOST_ISLVER)"; export ISLVER; \
LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \
XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \
Expand Down Expand Up @@ -318,6 +319,7 @@ HOST_GMPINC = @gmpinc@
# Where to find isl
HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
HOST_ISLVER = @islver@

# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
Expand Down
12 changes: 12 additions & 0 deletions config/isl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ AC_DEFUN([ISL_CHECK_VERSION],
AC_MSG_RESULT([recommended isl version is 0.15, minimum required isl version 0.14 is deprecated])
fi
AC_MSG_CHECKING([for isl-0.15])
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)
if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
islver="0.15"
AC_SUBST([islver])
fi
CFLAGS=$_isl_saved_CFLAGS
LDFLAGS=$_isl_saved_LDFLAGS
LIBS=$_isl_saved_LIBS
Expand Down
29 changes: 29 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ extra_linker_plugin_flags
extra_linker_plugin_configure_flags
islinc
isllibs
islver
poststage1_ldflags
poststage1_libs
stage1_ldflags
Expand Down Expand Up @@ -6048,6 +6049,34 @@ $as_echo "$gcc_cv_isl" >&6; }
$as_echo "recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; }
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl-0.15" >&5
$as_echo_n "checking for isl-0.15... " >&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_c_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; }

if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
islver="0.15"

fi

CFLAGS=$_isl_saved_CFLAGS
LDFLAGS=$_isl_saved_LDFLAGS
LIBS=$_isl_saved_LIBS
Expand Down
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2016-01-25 Aditya Kumar <[email protected]>
Sebastian Pop <[email protected]>

* Makefile.in: Set ISLVER in site.exp.

2016-01-25 Jakub Jelinek <[email protected]>

* omp-low.c (lower_omp_target) <case USE_DEVICE_PTR>: Set
Expand Down
1 change: 1 addition & 0 deletions gcc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3698,6 +3698,7 @@ site.exp: ./config.status Makefile
echo "set PLUGINCFLAGS \"$(PLUGINCFLAGS)\"" >> ./site.tmp; \
echo "set GMPINC \"$(GMPINC)\"" >> ./site.tmp; \
fi
@echo "set ISLVER \"$(ISLVER)\"" >> ./site.tmp
# If newlib has been configured, we need to pass -B to gcc so it can find
# newlib's crt0.o if it exists. This will cause a "path prefix not used"
# message if it doesn't, but the testsuite is supposed to ignore the message -
Expand Down
6 changes: 6 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2016-01-25 Aditya Kumar <[email protected]>
Sebastian Pop <[email protected]>

* gcc.dg/graphite/graphite.exp: Only run the fuse-*.c tests with
isl-0.15.

2016-01-25 Aditya Kumar <[email protected]>
Sebastian Pop <[email protected]>

Expand Down
4 changes: 2 additions & 2 deletions gcc/testsuite/gcc.dg/graphite/fuse-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ main (void)
B[i] = i + 2;
C[i] = i + 1;
}
for(int i=0; i<MAX; i++)
for(i=0; i<MAX; i++)
A[i] += B[i];
for(int i=0; i<MAX; i++)
for(i=0; i<MAX; i++)
A[i] += C[i];

for (i = 0; i < MAX; i++)
Expand Down
8 changes: 7 additions & 1 deletion gcc/testsuite/gcc.dg/graphite/graphite.exp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ]
set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \
$srcdir/$subdir/uns-interchange-*.c \
$srcdir/$subdir/isl-ast-gen-*.c \
$srcdir/$subdir/fuse-*.c \
$srcdir/$subdir/block-*.c \
$srcdir/$subdir/uns-block-*.c ] ]
set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ]
set fuse_files [lsort [glob -nocomplain $srcdir/$subdir/fuse-*.c ] ]

# Tests to be compiled.
set dg-do-what-default compile
Expand All @@ -59,6 +59,11 @@ set dg-do-what-default run
dg-runtest $run_id_files "" "-O2 -fgraphite-identity"
dg-runtest $opt_files "" "-O2 -ffast-math -floop-nest-optimize -fdump-tree-graphite-all"

global ISLVER
if { $ISLVER == "0.15" } {
dg-runtest $fuse_files "" "-O2 -ffast-math -floop-nest-optimize -fdump-tree-graphite-all"
}

# Vectorizer tests, to be run or compiled, depending on target capabilities.
global DEFAULT_VECTCFLAGS
set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
Expand All @@ -74,6 +79,7 @@ foreach f $id_files {lremove wait_to_run_files $f}
foreach f $run_id_files {lremove wait_to_run_files $f}
foreach f $opt_files {lremove wait_to_run_files $f}
foreach f $vect_files {lremove wait_to_run_files $f}
foreach f $fuse_files {lremove wait_to_run_files $f}
dg-runtest $wait_to_run_files "" "-ansi -pedantic-errors"

# Clean up.
Expand Down

0 comments on commit 45fc524

Please sign in to comment.