]>
Commit | Line | Data |
---|---|---|
8d9254fc | 1 | # Copyright (C) 2008-2020 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 gfortran-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/*.\[fF\]{,90,95,03,08} ] ] |
64630e61 | 41 | set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.\[fF\]{,90,95,03,08} ] ] |
d6bb5ccf SP |
42 | set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} \ |
43 | $srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ] | |
9e054f1b SP |
44 | set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ] |
45 | set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ] | |
46 | set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ] ] | |
2ac57409 | 47 | |
64630e61 SP |
48 | # Tests to be compiled. |
49 | set dg-do-what-default compile | |
a03bd005 TS |
50 | gfortran-dg-runtest $scop_files "" "-O2 -fgraphite -fdump-tree-graphite-all" |
51 | gfortran-dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math" | |
d6bb5ccf | 52 | gfortran-dg-runtest $opt_files "" "-O2 -floop-nest-optimize -ffast-math -fdump-tree-graphite-all" |
9dac82c4 | 53 | |
9b7937cf RS |
54 | # Set up a list of effective targets to run vector tests for all supported |
55 | # targets. | |
56 | global EFFECTIVE_TARGETS | |
57 | set EFFECTIVE_TARGETS "" | |
58 | ||
9dac82c4 SP |
59 | # Vectorizer tests, to be run or compiled, depending on target capabilities. |
60 | if [check_vect_support_and_set_flags] { | |
9b7937cf RS |
61 | et-dg-runtest gfortran-dg-runtest $vect_files "" \ |
62 | "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math" | |
9dac82c4 | 63 | } |
64630e61 SP |
64 | |
65 | # Tests to be run. | |
66 | set dg-do-what-default run | |
a03bd005 | 67 | gfortran-dg-runtest $run_id_files "" "-O2 -fgraphite-identity" |
2ac57409 SP |
68 | |
69 | # The default action for the rest of the files is 'compile'. | |
70 | set dg-do-what-default compile | |
64630e61 | 71 | foreach f $id_files {lremove wait_to_run_files $f} |
d6bb5ccf | 72 | foreach f $opt_files {lremove wait_to_run_files $f} |
64630e61 SP |
73 | foreach f $scop_files {lremove wait_to_run_files $f} |
74 | foreach f $run_id_files {lremove wait_to_run_files $f} | |
9e054f1b | 75 | foreach f $vect_files {lremove wait_to_run_files $f} |
a03bd005 | 76 | gfortran-dg-runtest $wait_to_run_files "" "" |
f8bf9252 SP |
77 | |
78 | # Clean up. | |
79 | set dg-do-what-default ${save-dg-do-what-default} | |
80 | ||
81 | # All done. | |
82 | dg-finish |