131
|
1 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
111
|
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 g++-dg.exp
|
|
21
|
|
22 if ![check_effective_target_fgraphite] {
|
|
23 return
|
|
24 }
|
|
25
|
|
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
|
|
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}
|
|
36
|
|
37 # Initialize `dg'.
|
|
38 dg-init
|
|
39
|
|
40 set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.C ] ]
|
|
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 ] ]
|
|
44 set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.C \
|
|
45 $srcdir/$subdir/block-*.C ] ]
|
|
46
|
|
47 # Tests to be compiled.
|
|
48 set dg-do-what-default compile
|
|
49 g++-dg-runtest $scop_files "" "-O2 -fgraphite -fdump-tree-graphite-all"
|
|
50 g++-dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math"
|
|
51
|
|
52 # Tests to be run.
|
|
53 set dg-do-what-default run
|
|
54 g++-dg-runtest $run_id_files "" "-O2 -fgraphite-identity"
|
|
55 g++-dg-runtest $opt_files "" "-O2 -floop-nest-optimize -ffast-math -fdump-tree-graphite-all"
|
|
56
|
|
57 # The default action for the rest of the files is 'compile'.
|
|
58 set dg-do-what-default compile
|
|
59 foreach f $scop_files {lremove wait_to_run_files $f}
|
|
60 foreach f $id_files {lremove wait_to_run_files $f}
|
|
61 foreach f $run_id_files {lremove wait_to_run_files $f}
|
|
62 foreach f $opt_files {lremove wait_to_run_files $f}
|
|
63 g++-dg-runtest $wait_to_run_files "" "-pedantic-errors"
|
|
64
|
|
65 # Clean up.
|
|
66 set dg-do-what-default ${save-dg-do-what-default}
|
|
67
|
|
68 # All done.
|
|
69 dg-finish
|