diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-31 02:45:54 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-31 02:45:54 +0000 |
commit | 418e8eb14e1860928f0c206cb57b247901b39dd1 (patch) | |
tree | 6d485388145b1294949a4b410aea87cbfe0940b7 | |
parent | 26c166eb38c241baaeefc2e78a248b3a3fc8b3f9 (diff) | |
download | gcc-418e8eb14e1860928f0c206cb57b247901b39dd1.tar.gz |
Modify the testsuite for the new Graphite.
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/graphite.exp: Implement an automatic selection of
flags based on the name of the testcase.
* gfortran.dg/graphite/graphite.exp: Same.
* gcc.dg/graphite/block-0.c: Adjusted.
* gcc.dg/graphite/block-1.c: Adjusted.
* gcc.dg/graphite/block-2.c: Adjusted.
* gcc.dg/graphite/block-3.c: Adjusted.
* gcc.dg/graphite/block-4.c: Adjusted.
* gcc.dg/graphite/block-5.c: Adjusted.
* gcc.dg/graphite/block-6.c: Adjusted.
* gcc.dg/graphite/pr37485.c: Adjusted.
* gcc.dg/graphite/pr37684.c: Adjusted.
* gcc.dg/graphite/pr37828.c: Adjusted.
* gcc.dg/graphite/pr37883.c: Adjusted.
* gcc.dg/graphite/pr37928.c: Adjusted.
* gcc.dg/graphite/pr37943.c: Adjusted.
* gcc.dg/graphite/pr38409.c: Adjusted.
* gcc.dg/graphite/pr38498.c: Adjusted.
* gcc.dg/graphite/pr38559.c: Adjusted.
* gcc.dg/graphite/pr39335.c: Adjusted.
* gcc.dg/graphite/pr39335_1.c: Adjusted.
* gcc.dg/graphite/scop-0.c: Adjusted.
* gcc.dg/graphite/scop-1.c: Adjusted.
* gcc.dg/graphite/scop-10.c: Adjusted.
* gcc.dg/graphite/scop-11.c: Adjusted.
* gcc.dg/graphite/scop-12.c: Adjusted.
* gcc.dg/graphite/scop-13.c: Adjusted.
* gcc.dg/graphite/scop-14.c: Adjusted.
* gcc.dg/graphite/scop-15.c: Adjusted.
* gcc.dg/graphite/scop-16.c: Adjusted.
* gcc.dg/graphite/scop-17.c: Adjusted.
* gcc.dg/graphite/scop-18.c: Adjusted.
* gcc.dg/graphite/scop-19.c: Adjusted.
* gcc.dg/graphite/scop-2.c: Adjusted.
* gcc.dg/graphite/scop-3.c: Adjusted.-
* gcc.dg/graphite/scop-4.c: Adjusted.
* gcc.dg/graphite/scop-5.c: Adjusted.
* gcc.dg/graphite/scop-6.c: Adjusted.
* gcc.dg/graphite/scop-7.c: Adjusted.
* gcc.dg/graphite/scop-8.c: Adjusted.
* gcc.dg/graphite/scop-9.c: Adjusted.
* gcc.dg/graphite/scop-matmult.c: Adjusted.
* gfortran.dg/graphite/block-1.f90: Adjusted.
* gfortran.dg/graphite/block-2.f: Adjusted.
* gfortran.dg/graphite/block-3.f90: Adjusted.
* gfortran.dg/graphite/block-4.f90: Adjusted.
* gfortran.dg/graphite/id-2.f90: Adjusted.
* gfortran.dg/graphite/id-3.f90: Adjusted.
* gfortran.dg/graphite/id-4.f90: Adjusted.
* gfortran.dg/graphite/pr37852.f90: Adjusted.
* gfortran.dg/graphite/pr37857.f90: Adjusted.
* gfortran.dg/graphite/pr37980.f90: Adjusted.
* gfortran.dg/graphite/pr38083.f90: Adjusted.
* gfortran.dg/graphite/pr38953.f90: Adjusted.
* gfortran.dg/graphite/scop-1.f: Adjusted.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150302 138bc75d-0d04-0410-961f-82ee72b054a4
55 files changed, 181 insertions, 108 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 33ba854e9bf..97068351a48 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,62 @@ +2009-07-30 Sebastian Pop <sebastian.pop@amd.com> + + * gcc.dg/graphite/graphite.exp: Implement an automatic selection of + flags based on the name of the testcase. + * gfortran.dg/graphite/graphite.exp: Same. + + * gcc.dg/graphite/block-0.c: Adjusted. + * gcc.dg/graphite/block-1.c: Adjusted. + * gcc.dg/graphite/block-2.c: Adjusted. + * gcc.dg/graphite/block-3.c: Adjusted. + * gcc.dg/graphite/block-4.c: Adjusted. + * gcc.dg/graphite/block-5.c: Adjusted. + * gcc.dg/graphite/block-6.c: Adjusted. + * gcc.dg/graphite/pr37485.c: Adjusted. + * gcc.dg/graphite/pr37684.c: Adjusted. + * gcc.dg/graphite/pr37828.c: Adjusted. + * gcc.dg/graphite/pr37883.c: Adjusted. + * gcc.dg/graphite/pr37928.c: Adjusted. + * gcc.dg/graphite/pr37943.c: Adjusted. + * gcc.dg/graphite/pr38409.c: Adjusted. + * gcc.dg/graphite/pr38498.c: Adjusted. + * gcc.dg/graphite/pr38559.c: Adjusted. + * gcc.dg/graphite/pr39335.c: Adjusted. + * gcc.dg/graphite/pr39335_1.c: Adjusted. + * gcc.dg/graphite/scop-0.c: Adjusted. + * gcc.dg/graphite/scop-1.c: Adjusted. + * gcc.dg/graphite/scop-10.c: Adjusted. + * gcc.dg/graphite/scop-11.c: Adjusted. + * gcc.dg/graphite/scop-12.c: Adjusted. + * gcc.dg/graphite/scop-13.c: Adjusted. + * gcc.dg/graphite/scop-14.c: Adjusted. + * gcc.dg/graphite/scop-15.c: Adjusted. + * gcc.dg/graphite/scop-16.c: Adjusted. + * gcc.dg/graphite/scop-17.c: Adjusted. + * gcc.dg/graphite/scop-18.c: Adjusted. + * gcc.dg/graphite/scop-19.c: Adjusted. + * gcc.dg/graphite/scop-2.c: Adjusted. + * gcc.dg/graphite/scop-3.c: Adjusted.- + * gcc.dg/graphite/scop-4.c: Adjusted. + * gcc.dg/graphite/scop-5.c: Adjusted. + * gcc.dg/graphite/scop-6.c: Adjusted. + * gcc.dg/graphite/scop-7.c: Adjusted. + * gcc.dg/graphite/scop-8.c: Adjusted. + * gcc.dg/graphite/scop-9.c: Adjusted. + * gcc.dg/graphite/scop-matmult.c: Adjusted. + * gfortran.dg/graphite/block-1.f90: Adjusted. + * gfortran.dg/graphite/block-2.f: Adjusted. + * gfortran.dg/graphite/block-3.f90: Adjusted. + * gfortran.dg/graphite/block-4.f90: Adjusted. + * gfortran.dg/graphite/id-2.f90: Adjusted. + * gfortran.dg/graphite/id-3.f90: Adjusted. + * gfortran.dg/graphite/id-4.f90: Adjusted. + * gfortran.dg/graphite/pr37852.f90: Adjusted. + * gfortran.dg/graphite/pr37857.f90: Adjusted. + * gfortran.dg/graphite/pr37980.f90: Adjusted. + * gfortran.dg/graphite/pr38083.f90: Adjusted. + * gfortran.dg/graphite/pr38953.f90: Adjusted. + * gfortran.dg/graphite/scop-1.f: Adjusted. + 2009-07-30 Doug Kwan <dougkwan@google.com> * gcc.target/arm/neon/polytypes.c: Adjust test for new notes diff --git a/gcc/testsuite/gcc.dg/graphite/block-0.c b/gcc/testsuite/gcc.dg/graphite/block-0.c index 627f044fc14..55b903650e2 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-0.c +++ b/gcc/testsuite/gcc.dg/graphite/block-0.c @@ -1,5 +1,3 @@ -/* { dg-options "-O -floop-block -fdump-tree-graphite-all" } */ - #define N 1000 int toto() @@ -21,5 +19,5 @@ main() return toto(); } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite"} } */ +/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-1.c b/gcc/testsuite/gcc.dg/graphite/block-1.c index 0a70e9e10a4..ba772b3f952 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-1.c +++ b/gcc/testsuite/gcc.dg/graphite/block-1.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ - #define MAX 8192 void bar (void); @@ -36,5 +34,5 @@ int main() return sum; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite"} } */ +/* { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-2.c b/gcc/testsuite/gcc.dg/graphite/block-2.c index fc4e889e791..210ea342776 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-2.c +++ b/gcc/testsuite/gcc.dg/graphite/block-2.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ - typedef unsigned char UChar; typedef int Int32; typedef unsigned int UInt32; diff --git a/gcc/testsuite/gcc.dg/graphite/block-3.c b/gcc/testsuite/gcc.dg/graphite/block-3.c index 1d2ca40dbac..6358bce1e24 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-3.c +++ b/gcc/testsuite/gcc.dg/graphite/block-3.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ - #define N 24 #define M 100 diff --git a/gcc/testsuite/gcc.dg/graphite/block-4.c b/gcc/testsuite/gcc.dg/graphite/block-4.c index e3649f01d2d..773dfef5df6 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-4.c +++ b/gcc/testsuite/gcc.dg/graphite/block-4.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ - #define N 24 #define M 1000 diff --git a/gcc/testsuite/gcc.dg/graphite/block-5.c b/gcc/testsuite/gcc.dg/graphite/block-5.c index e0bd4688d39..7864f32e1fc 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-5.c +++ b/gcc/testsuite/gcc.dg/graphite/block-5.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ - #define N 10000 void foo (int); int test () @@ -22,5 +20,5 @@ int test () } /* Interchange is legal for loops 0 and 1 of the first two SCoPs */ -/* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite"} } */ +/* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-6.c b/gcc/testsuite/gcc.dg/graphite/block-6.c index 77429f1cb83..5545ec9fc91 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-6.c +++ b/gcc/testsuite/gcc.dg/graphite/block-6.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ - #define N 10000 void foo (int); int test () @@ -21,5 +19,5 @@ int test () } /* Interchange is not legal for loops 0 and 1 of SCoP 2. */ -/* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite"} } */ +/* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp index a1257177f55..17e6b2be167 100644 --- a/gcc/testsuite/gcc.dg/graphite/graphite.exp +++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp @@ -23,23 +23,66 @@ if ![check_effective_target_fgraphite] { return } +# Remove VALUE from LIST_VARIABLE. +proc lremove {list_variable value} { + upvar 1 $list_variable var + set idx [lsearch -exact $var $value] + set var [lreplace $var $idx $idx] +} + # The default action for a test is 'compile'. Save current default. global dg-do-what-default set save-dg-do-what-default ${dg-do-what-default} set dg-do-what-default compile -# If a testcase doesn't have special options, use these. -global DEFAULT_CFLAGS -if ![info exists DEFAULT_CFLAGS] then { - set DEFAULT_CFLAGS " -ansi -pedantic-errors" -} - # Initialize `dg'. dg-init # Main loop. -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \ - "" $DEFAULT_CFLAGS + +set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ] + +# Flags using for block-* files. +set DEFAULT_CFLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all" +set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c ] ] +dg-runtest $block_files "" $DEFAULT_CFLAGS_GRAPHITE_BLOCK +foreach block_file $block_files {lremove wait_to_run_files $block_file} + +# Flags using for id-* files. +set DEFAULT_CFLAGS_GRAPHITE_IDENTITY "-O2 -fgraphite-identity -fdump-tree-graphite-all" +set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ] +dg-runtest $id_files "" $DEFAULT_CFLAGS_GRAPHITE_IDENTITY +foreach id_file $id_files {lremove wait_to_run_files $id_file} + +# Flags using for interchange-* files. +set DEFAULT_CFLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all -floop-interchange" +set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c ] ] +dg-runtest $interchange_files "" $DEFAULT_CFLAGS_GRAPHITE_BLOCK +foreach interchange_file $interchange_files {lremove wait_to_run_files $interchange_file} + +# Flags using for scop-* files. +set DEFAULT_CFLAGS_GRAPHITE_SCOP "-O2 -fgraphite -fdump-tree-graphite-all" +set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ] +dg-runtest $scop_files "" $DEFAULT_CFLAGS_GRAPHITE_SCOP +foreach scop_file $scop_files {lremove wait_to_run_files $scop_file} + + +# Schedule now the tests to be run. +set dg-do-what-default run + +# Flags using for run-id-* files. +set DEFAULT_CFLAGS_RUN_ID "-O2 -fgraphite-identity" +set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ] +dg-runtest $run_id_files "" $DEFAULT_CFLAGS_RUN_ID +foreach run_id_file $run_id_files {lremove wait_to_run_files $run_id_file} + + +# The default action for the rest of the files is 'compile'. +set dg-do-what-default compile + +# Flags using for other files. +set DEFAULT_CFLAGS_GRAPHITE "-ansi -pedantic-errors" +dg-runtest $wait_to_run_files "" $DEFAULT_CFLAGS_GRAPHITE # Clean up. set dg-do-what-default ${save-dg-do-what-default} diff --git a/gcc/testsuite/gcc.dg/graphite/pr37485.c b/gcc/testsuite/gcc.dg/graphite/pr37485.c index cf0969bac1d..ce2507b3d6c 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37485.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37485.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ +/* { dg-options "-O2 -fdump-tree-graphite-all" } */ typedef unsigned char UChar; typedef int Int32; diff --git a/gcc/testsuite/gcc.dg/graphite/pr37684.c b/gcc/testsuite/gcc.dg/graphite/pr37684.c index a9e6f5a4a59..ab5a6853316 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37684.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37684.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ +/* { dg-options "-O2 -fdump-tree-graphite-all" } */ typedef struct _IO_FILE FILE; struct _IO_marker { diff --git a/gcc/testsuite/gcc.dg/graphite/pr37828.c b/gcc/testsuite/gcc.dg/graphite/pr37828.c index 0a0412d8045..df0ef7c0aa7 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37828.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37828.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block" } */ +/* { dg-options "-O2" } */ typedef struct foo { diff --git a/gcc/testsuite/gcc.dg/graphite/pr37883.c b/gcc/testsuite/gcc.dg/graphite/pr37883.c index 2ab043adce1..9b386561c33 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37883.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37883.c @@ -1,4 +1,4 @@ -/* { dg-options "-O3 -floop-block" } */ +/* { dg-options "-O3" } */ void test_sort() { diff --git a/gcc/testsuite/gcc.dg/graphite/pr37928.c b/gcc/testsuite/gcc.dg/graphite/pr37928.c index 47ad5bce0bd..3c33f3a4637 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37928.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37928.c @@ -1,4 +1,4 @@ -/* { dg-options "-O3 -floop-block" } */ +/* { dg-options "-O3" } */ int get_state(int size, int *node, int *hash) { diff --git a/gcc/testsuite/gcc.dg/graphite/pr37943.c b/gcc/testsuite/gcc.dg/graphite/pr37943.c index a4b4fe5658f..4513d12c0b7 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37943.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37943.c @@ -31,4 +31,3 @@ unsigned char compress(test *in) } /* { dg-final { cleanup-tree-dump "graphite" } } */ - diff --git a/gcc/testsuite/gcc.dg/graphite/pr38409.c b/gcc/testsuite/gcc.dg/graphite/pr38409.c index 41c67753426..5cdb4725dbf 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr38409.c +++ b/gcc/testsuite/gcc.dg/graphite/pr38409.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block" } */ +/* { dg-options "-O2" } */ typedef struct test input ; struct test diff --git a/gcc/testsuite/gcc.dg/graphite/pr38498.c b/gcc/testsuite/gcc.dg/graphite/pr38498.c index c79bbad554d..d20b4ae165a 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr38498.c +++ b/gcc/testsuite/gcc.dg/graphite/pr38498.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block" } */ +/* { dg-options "-O2" } */ double test_vector (float **data, int rows, int cols, int vqrows,double epsilon, int maxiter,int **mean, int *map) { diff --git a/gcc/testsuite/gcc.dg/graphite/pr38559.c b/gcc/testsuite/gcc.dg/graphite/pr38559.c index 1e2ef0a4ff3..7f90a50acd0 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr38559.c +++ b/gcc/testsuite/gcc.dg/graphite/pr38559.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block" } */ +/* { dg-options "-O2" } */ int test() { diff --git a/gcc/testsuite/gcc.dg/graphite/pr39335.c b/gcc/testsuite/gcc.dg/graphite/pr39335.c index c86e03ab73a..5b8fb543855 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr39335.c +++ b/gcc/testsuite/gcc.dg/graphite/pr39335.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-interchange" } */ +/* { dg-options "-O2" } */ typedef unsigned char byte; typedef struct gx_device_s gx_device; diff --git a/gcc/testsuite/gcc.dg/graphite/pr39335_1.c b/gcc/testsuite/gcc.dg/graphite/pr39335_1.c index 257c2c99436..dfa2465e34d 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr39335_1.c +++ b/gcc/testsuite/gcc.dg/graphite/pr39335_1.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-interchange" } */ +/* { dg-options "-O2" } */ void crash_me(int num1, int num2, char * in, char * out) { diff --git a/gcc/testsuite/gcc.dg/graphite/scop-0.c b/gcc/testsuite/gcc.dg/graphite/scop-0.c index ea3ae065a0b..067e7bcffe0 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-0.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-0.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - int foo (void); void bar (void); diff --git a/gcc/testsuite/gcc.dg/graphite/scop-1.c b/gcc/testsuite/gcc.dg/graphite/scop-1.c index ed6159fb365..ba2590c1102 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-1.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-1.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-10.c b/gcc/testsuite/gcc.dg/graphite/scop-10.c index 8aff2c74302..139f4c11494 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-10.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-10.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-11.c b/gcc/testsuite/gcc.dg/graphite/scop-11.c index e5a0fdb3904..544b36bd744 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-11.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-11.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-12.c b/gcc/testsuite/gcc.dg/graphite/scop-12.c index 0c130330ccd..71d34b1db07 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-12.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-12.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-13.c b/gcc/testsuite/gcc.dg/graphite/scop-13.c index aa55e10f3f4..b2ca5b4008f 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-13.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-13.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-14.c b/gcc/testsuite/gcc.dg/graphite/scop-14.c index a707b01d450..867e293d649 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-14.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-14.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-15.c b/gcc/testsuite/gcc.dg/graphite/scop-15.c index 9324631e2fd..6b2c2bdc88f 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-15.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-15.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - # define EXTERN(type, array) extern type array[] typedef unsigned char uch; typedef unsigned short ush; diff --git a/gcc/testsuite/gcc.dg/graphite/scop-16.c b/gcc/testsuite/gcc.dg/graphite/scop-16.c index d0b32f63973..d465d953b26 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-16.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-16.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - #define N 10000 void foo (int); int test () diff --git a/gcc/testsuite/gcc.dg/graphite/scop-17.c b/gcc/testsuite/gcc.dg/graphite/scop-17.c index c2fec3fccaf..dd7bdadc4e8 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-17.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-17.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - #define N 10000 void foo (int); int test () diff --git a/gcc/testsuite/gcc.dg/graphite/scop-18.c b/gcc/testsuite/gcc.dg/graphite/scop-18.c index 6264116e114..7d56cb74279 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-18.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-18.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - #define N 24 #define M 1000 diff --git a/gcc/testsuite/gcc.dg/graphite/scop-19.c b/gcc/testsuite/gcc.dg/graphite/scop-19.c index 3ad49971bc0..cfbf401642e 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-19.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-19.c @@ -1,4 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ typedef unsigned int __uint32_t; typedef __uint32_t __size_t; typedef __size_t size_t; diff --git a/gcc/testsuite/gcc.dg/graphite/scop-2.c b/gcc/testsuite/gcc.dg/graphite/scop-2.c index cf25dcdaf09..9e494f4d006 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-2.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-2.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-3.c b/gcc/testsuite/gcc.dg/graphite/scop-3.c index 1789e6b6c5a..e20bfdcb34b 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-3.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-3.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - int toto() { int i, j, k; @@ -26,5 +24,5 @@ int toto() return a[3][5] + b[1]; } -/* { dg-final { scan-tree-dump-times "number of SCoPs: 3" 1 "graphite"} } */ +/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite"} } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/scop-4.c b/gcc/testsuite/gcc.dg/graphite/scop-4.c index 515c53ad592..4ab2d07f48d 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-4.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-4.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-5.c b/gcc/testsuite/gcc.dg/graphite/scop-5.c index 697a28ea168..4f4b45b4914 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-5.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-5.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-6.c b/gcc/testsuite/gcc.dg/graphite/scop-6.c index d2623204735..df208acb201 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-6.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-6.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-7.c b/gcc/testsuite/gcc.dg/graphite/scop-7.c index 1187ce104ec..c02748fa71a 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-7.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-7.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-8.c b/gcc/testsuite/gcc.dg/graphite/scop-8.c index 491ad372feb..3f14e347a51 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-8.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-8.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - int bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-9.c b/gcc/testsuite/gcc.dg/graphite/scop-9.c index 871b86b8bd4..a803d921790 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-9.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-9.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - void bar (void); int toto() diff --git a/gcc/testsuite/gcc.dg/graphite/scop-matmult.c b/gcc/testsuite/gcc.dg/graphite/scop-matmult.c index 61a5be1fd21..2d2dce3c160 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-matmult.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-matmult.c @@ -1,5 +1,3 @@ -/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ - float A[1000][1000], B[1000][1000], C[1000][1000]; /* Multiply two n x n matrices A and B and store the result in C. */ @@ -16,5 +14,5 @@ void matmult (int n) /* This one fails because the number of iterations cannot be determined anymore for the outermost loop. */ -/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gfortran.dg/graphite/block-1.f90 b/gcc/testsuite/gfortran.dg/graphite/block-1.f90 index 124f06d16eb..8125853b937 100644 --- a/gcc/testsuite/gfortran.dg/graphite/block-1.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/block-1.f90 @@ -1,5 +1,3 @@ -! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } - subroutine matrix_multiply(a,b,c,n) real(8), dimension(n,n) :: a,b,c diff --git a/gcc/testsuite/gfortran.dg/graphite/block-2.f b/gcc/testsuite/gfortran.dg/graphite/block-2.f index af966ec5f97..6c7ee6fe951 100644 --- a/gcc/testsuite/gfortran.dg/graphite/block-2.f +++ b/gcc/testsuite/gfortran.dg/graphite/block-2.f @@ -1,5 +1,3 @@ -! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } - SUBROUTINE MATRIX_MUL_UNROLLED (A, B, C, L, M, N) DIMENSION A(L,M), B(M,N), C(L,N) diff --git a/gcc/testsuite/gfortran.dg/graphite/block-3.f90 b/gcc/testsuite/gfortran.dg/graphite/block-3.f90 index c7809d3431b..1579e66e411 100644 --- a/gcc/testsuite/gfortran.dg/graphite/block-3.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/block-3.f90 @@ -1,5 +1,3 @@ -! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } - subroutine matrix_multiply(a,b,c,n) real(8), dimension(n,n) :: a,b,c diff --git a/gcc/testsuite/gfortran.dg/graphite/block-4.f90 b/gcc/testsuite/gfortran.dg/graphite/block-4.f90 index 586a7772512..f37d70aec3f 100644 --- a/gcc/testsuite/gfortran.dg/graphite/block-4.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/block-4.f90 @@ -1,5 +1,3 @@ -! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } - subroutine matrix_multiply(a,b,c,n) real(8), dimension(n,n) :: a,b,c diff --git a/gcc/testsuite/gfortran.dg/graphite/graphite.exp b/gcc/testsuite/gfortran.dg/graphite/graphite.exp index a9fdb2c508f..717413e63ce 100644 --- a/gcc/testsuite/gfortran.dg/graphite/graphite.exp +++ b/gcc/testsuite/gfortran.dg/graphite/graphite.exp @@ -23,23 +23,64 @@ if ![check_effective_target_fgraphite] { return } +# Remove VALUE from LIST_VARIABLE. +proc lremove {list_variable value} { + upvar 1 $list_variable var + set idx [lsearch -exact $var $value] + set var [lreplace $var $idx $idx] +} + # The default action for a test is 'compile'. Save current default. global dg-do-what-default set save-dg-do-what-default ${dg-do-what-default} set dg-do-what-default compile -# If a testcase doesn't have special options, use these. -set DEFAULT_GRAPHITE_FLAGS "" - # Initialize `dg'. dg-init # Main loop. -gfortran-dg-runtest [lsort \ - [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] $DEFAULT_GRAPHITE_FLAGS +set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] + +# Flags using for block-* files. +set DEFAULT_FLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all" +set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ] +gfortran-dg-runtest $block_files $DEFAULT_FLAGS_GRAPHITE_BLOCK +foreach block_file $block_files {lremove wait_to_run_files $block_file} + +# Flags using for id-* files. +set DEFAULT_FLAGS_GRAPHITE_IDENTITY "-O2 -fgraphite-identity -fdump-tree-graphite-all" +set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.\[fF\]{,90,95,03,08} ] ] +gfortran-dg-runtest $id_files $DEFAULT_FLAGS_GRAPHITE_IDENTITY +foreach id_file $id_files {lremove wait_to_run_files $id_file} + +# Flags using for interchange-* files. +set DEFAULT_FLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all -floop-interchange" +set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} ] ] +gfortran-dg-runtest $interchange_files $DEFAULT_FLAGS_GRAPHITE_BLOCK +foreach interchange_file $interchange_files {lremove wait_to_run_files $interchange_file} -gfortran-dg-runtest [lsort \ - [glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] $DEFAULT_GRAPHITE_FLAGS +# Flags using for scop-* files. +set DEFAULT_FLAGS_GRAPHITE_SCOP "-O2 -fgraphite -fdump-tree-graphite-all" +set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ] +gfortran-dg-runtest $scop_files $DEFAULT_FLAGS_GRAPHITE_SCOP +foreach scop_file $scop_files {lremove wait_to_run_files $scop_file} + +# Schedule now the tests to be run. +set dg-do-what-default run + +# Flags using for run-id-* files. +set DEFAULT_FLAGS_RUN_ID "-O2 -fgraphite-identity" +set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ] +gfortran-dg-runtest $run_id_files $DEFAULT_FLAGS_RUN_ID +foreach run_id_file $run_id_files {lremove wait_to_run_files $run_id_file} + + +# The default action for the rest of the files is 'compile'. +set dg-do-what-default compile + +# Flags using for other files. +set DEFAULT_GRAPHITE_FLAGS "" +gfortran-dg-runtest $wait_to_run_files $DEFAULT_GRAPHITE_FLAGS # Clean up. set dg-do-what-default ${save-dg-do-what-default} diff --git a/gcc/testsuite/gfortran.dg/graphite/id-2.f90 b/gcc/testsuite/gfortran.dg/graphite/id-2.f90 index 0c9f54bb979..720fff8dd02 100644 --- a/gcc/testsuite/gfortran.dg/graphite/id-2.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/id-2.f90 @@ -1,5 +1,3 @@ -! { dg-options "-O2 -fgraphite-identity" } - module solv_cap integer, parameter, public :: dp = selected_real_kind(5) contains diff --git a/gcc/testsuite/gfortran.dg/graphite/id-3.f90 b/gcc/testsuite/gfortran.dg/graphite/id-3.f90 index 394bdf7ac16..7f0efc7bc8e 100644 --- a/gcc/testsuite/gfortran.dg/graphite/id-3.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/id-3.f90 @@ -1,5 +1,3 @@ -! { dg-options "-O2 -fgraphite-identity" } - subroutine gentrs (ptrst, ncls, xmin, dcls, xdont, ndon) do icls1 = 1, ncls prec: do diff --git a/gcc/testsuite/gfortran.dg/graphite/id-4.f90 b/gcc/testsuite/gfortran.dg/graphite/id-4.f90 index 896d608777e..b2c6cb04edc 100644 --- a/gcc/testsuite/gfortran.dg/graphite/id-4.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/id-4.f90 @@ -1,5 +1,3 @@ -! { dg-options "-O2 -fgraphite-identity" } - MODULE Vcimage CHARACTER (LEN=80), SAVE :: CARD, FIELD END MODULE Vcimage diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37852.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37852.f90 index 50e23428f82..a5d48b7124a 100644 --- a/gcc/testsuite/gfortran.dg/graphite/pr37852.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/pr37852.f90 @@ -1,4 +1,4 @@ -! { dg-options "-O2 -floop-block" } +! { dg-options "-O2 " } PROGRAM TEST_FPU CHARACTER (LEN=36) :: invert_id(1) = & diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37857.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37857.f90 index de2d3a124ee..c2cccb775da 100644 --- a/gcc/testsuite/gfortran.dg/graphite/pr37857.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/pr37857.f90 @@ -1,4 +1,4 @@ -! { dg-options "-O2 -floop-block" } +! { dg-options "-O2 " } program superficie_proteina integer, parameter :: LONGreal = selected_real_kind(12,90) diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37980.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37980.f90 index 5306aa84c92..62eccf35ff1 100644 --- a/gcc/testsuite/gfortran.dg/graphite/pr37980.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/pr37980.f90 @@ -1,4 +1,4 @@ -! { dg-options "-O2 -floop-block" } +! { dg-options "-O2 " } module INT_MODULE contains diff --git a/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 b/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 index 834d33ab833..da8c3cc7914 100644 --- a/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 @@ -1,4 +1,4 @@ -! { dg-options "-O3 -floop-block" } +! { dg-options "-O3 " } SUBROUTINE IVSORT (IL,IH,NSEGS,IOUNIT) INTEGER IOUNIT diff --git a/gcc/testsuite/gfortran.dg/graphite/pr38953.f90 b/gcc/testsuite/gfortran.dg/graphite/pr38953.f90 index 245db0dfe28..73224764f16 100644 --- a/gcc/testsuite/gfortran.dg/graphite/pr38953.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/pr38953.f90 @@ -1,4 +1,4 @@ -! { dg-options "-O3 -floop-block -fgraphite-identity" } +! { dg-options "-O3 -fgraphite-identity" } MODULE MAIN1 INTEGER , PARAMETER :: IFMAX = 40 , IKN = 85 , ISTRG = 132 , & diff --git a/gcc/testsuite/gfortran.dg/graphite/scop-1.f b/gcc/testsuite/gfortran.dg/graphite/scop-1.f index a279abaf9c2..5bd463c4e9c 100644 --- a/gcc/testsuite/gfortran.dg/graphite/scop-1.f +++ b/gcc/testsuite/gfortran.dg/graphite/scop-1.f @@ -1,5 +1,3 @@ -C { dg-options "-O2 -fgraphite" } - dimension p1(2),t(6,4),b1(2),b2(2),al1(2),al2(2),g1(2),g2(2) save if(nlin.eq.0) then @@ -11,3 +9,5 @@ C { dg-options "-O2 -fgraphite" } endif end +! { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } } +! { dg-final { cleanup-tree-dump "graphite" } } |