2009-08-14 Paolo Bonzini <bonzini@gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / graphite_autopar / graphite_autopar.exp
blob11d19a8d9fe081eefc051b1cfafaf8060017421c
1 # Copyright (C) 2008 Free Software Foundation, Inc.
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.
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.
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/>.
17 # GCC testsuite that uses the `dg.exp' driver.
19 # Load support procs.
20 load_lib gcc-dg.exp
22 if ![check_effective_target_pthread] {
23 return
26 if ![check_effective_target_fgraphite] {
27 return
30 # Remove VALUE from LIST_VARIABLE.
31 proc lremove {list_variable value} {
32 upvar 1 $list_variable var
33 set idx [lsearch -exact $var $value]
34 set var [lreplace $var $idx $idx]
37 # Set default action for these tests is 'run'. Save current default.
38 global dg-do-what-default
39 set save-dg-do-what-default ${dg-do-what-default}
40 set dg-do-what-default run
42 # Initialize `dg'.
43 dg-init
45 # Main loop.
47 set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c]]
49 # Flags using for force-parallel-*.c files.
50 set DEFAULT_CFLAGS_FORCE_PARALLEL " -ansi -pedantic-errors -O2 \
51 -ftree-parallelize-loops=4 -floop-parallelize-all \
52 -fdump-tree-parloops-details -fdump-tree-optimized \
53 -fno-loop-strip-mine -fdump-tree-graphite-all"
54 set force_parallel_files \
55 [lsort [glob -nocomplain $srcdir/$subdir/force-parallel-*.c]]
56 dg-runtest $force_parallel_files "" $DEFAULT_CFLAGS_FORCE_PARALLEL
57 foreach force_parallel_file $force_parallel_files \
58 {lremove wait_to_run_files $force_parallel_file}
60 # Flags using for other files.
61 set DEFAULT_CFLAGS_GRAPHITE "-ansi -pedantic-errors"
62 dg-runtest $wait_to_run_files "" $DEFAULT_CFLAGS_GRAPHITE
64 # Clean up.
65 set dg-do-what-default ${save-dg-do-what-default}
67 # All done.
68 dg-finish