annotate gcc/testsuite/gcc.dg/graphite/graphite.exp @ 131:84e7813d76e9

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