]>
Commit | Line | Data |
---|---|---|
818ab71a | 1 | # Copyright (C) 2006-2016 Free Software Foundation, Inc. |
f8bf9252 SP |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with GCC; see the file COPYING3. If not see | |
15 | # <http://www.gnu.org/licenses/>. | |
16 | ||
17 | # GCC testsuite that uses the `dg.exp' driver. | |
18 | ||
19 | # Load support procs. | |
20 | load_lib gcc-dg.exp | |
21 | ||
22 | if ![check_effective_target_fgraphite] { | |
23 | return | |
24 | } | |
25 | ||
2ac57409 SP |
26 | # Remove VALUE from LIST_VARIABLE. |
27 | proc lremove {list_variable value} { | |
28 | upvar 1 $list_variable var | |
29 | set idx [lsearch -exact $var $value] | |
30 | set var [lreplace $var $idx $idx] | |
31 | } | |
32 | ||
f8bf9252 SP |
33 | # The default action for a test is 'compile'. Save current default. |
34 | global dg-do-what-default | |
35 | set save-dg-do-what-default ${dg-do-what-default} | |
f8bf9252 | 36 | |
f8bf9252 SP |
37 | # Initialize `dg'. |
38 | dg-init | |
39 | ||
2ac57409 | 40 | set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ] |
64630e61 SP |
41 | set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ] |
42 | set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ] | |
43 | set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ] | |
d6bb5ccf SP |
44 | set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \ |
45 | $srcdir/$subdir/uns-interchange-*.c \ | |
d82f8c85 | 46 | $srcdir/$subdir/isl-ast-gen-*.c \ |
d6bb5ccf SP |
47 | $srcdir/$subdir/block-*.c \ |
48 | $srcdir/$subdir/uns-block-*.c ] ] | |
9e054f1b | 49 | set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ] |
1e050c90 | 50 | set fuse_files [lsort [glob -nocomplain $srcdir/$subdir/fuse-*.c ] ] |
2ac57409 | 51 | |
64630e61 SP |
52 | # Tests to be compiled. |
53 | set dg-do-what-default compile | |
54 | dg-runtest $scop_files "" "-O2 -fgraphite -fdump-tree-graphite-all" | |
55 | dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math" | |
2ac57409 | 56 | |
64630e61 | 57 | # Tests to be run. |
2ac57409 | 58 | set dg-do-what-default run |
64630e61 | 59 | dg-runtest $run_id_files "" "-O2 -fgraphite-identity" |
d6bb5ccf | 60 | dg-runtest $opt_files "" "-O2 -ffast-math -floop-nest-optimize -fdump-tree-graphite-all" |
2ac57409 | 61 | |
1e050c90 AK |
62 | global ISLVER |
63 | if { $ISLVER == "0.15" } { | |
64 | dg-runtest $fuse_files "" "-O2 -ffast-math -floop-nest-optimize -fdump-tree-graphite-all" | |
65 | } | |
66 | ||
9a31f6a3 UB |
67 | # Vectorizer tests, to be run or compiled, depending on target capabilities. |
68 | global DEFAULT_VECTCFLAGS | |
9dac82c4 | 69 | set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math" |
9a31f6a3 UB |
70 | |
71 | if [check_vect_support_and_set_flags] { | |
72 | dg-runtest $vect_files "" $DEFAULT_VECTCFLAGS | |
73 | } | |
74 | ||
2ac57409 SP |
75 | # The default action for the rest of the files is 'compile'. |
76 | set dg-do-what-default compile | |
64630e61 SP |
77 | foreach f $scop_files {lremove wait_to_run_files $f} |
78 | foreach f $id_files {lremove wait_to_run_files $f} | |
79 | foreach f $run_id_files {lremove wait_to_run_files $f} | |
d6bb5ccf | 80 | foreach f $opt_files {lremove wait_to_run_files $f} |
9e054f1b | 81 | foreach f $vect_files {lremove wait_to_run_files $f} |
1e050c90 | 82 | foreach f $fuse_files {lremove wait_to_run_files $f} |
64630e61 | 83 | dg-runtest $wait_to_run_files "" "-ansi -pedantic-errors" |
f8bf9252 SP |
84 | |
85 | # Clean up. | |
86 | set dg-do-what-default ${save-dg-do-what-default} | |
87 | ||
88 | # All done. | |
89 | dg-finish |