OSDN Git Service

Modify the testsuite for the new Graphite.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / graphite / graphite.exp
index a125717..17e6b2b 100644 (file)
@@ -23,23 +23,66 @@ if ![check_effective_target_fgraphite] {
   return
 }
 
+# Remove VALUE from LIST_VARIABLE.
+proc lremove {list_variable value} {
+    upvar 1 $list_variable var
+    set idx [lsearch -exact $var $value]
+    set var [lreplace $var $idx $idx]
+}
+
 # The default action for a test is 'compile'.  Save current default.
 global dg-do-what-default
 set save-dg-do-what-default ${dg-do-what-default}
 set dg-do-what-default compile
 
-# If a testcase doesn't have special options, use these.
-global DEFAULT_CFLAGS
-if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
-}
-
 # Initialize `dg'.
 dg-init
 
 # Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
-       "" $DEFAULT_CFLAGS
+
+set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ]
+
+# Flags using for block-* files.
+set DEFAULT_CFLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all"
+set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c ] ]
+dg-runtest $block_files "" $DEFAULT_CFLAGS_GRAPHITE_BLOCK
+foreach block_file $block_files {lremove wait_to_run_files $block_file}
+
+# Flags using for id-* files.
+set DEFAULT_CFLAGS_GRAPHITE_IDENTITY "-O2 -fgraphite-identity -fdump-tree-graphite-all"
+set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ]
+dg-runtest $id_files "" $DEFAULT_CFLAGS_GRAPHITE_IDENTITY
+foreach id_file $id_files {lremove wait_to_run_files $id_file}
+
+# Flags using for interchange-* files.
+set DEFAULT_CFLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all -floop-interchange"
+set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c ] ]
+dg-runtest $interchange_files "" $DEFAULT_CFLAGS_GRAPHITE_BLOCK
+foreach interchange_file $interchange_files {lremove wait_to_run_files $interchange_file}
+
+# Flags using for scop-* files.
+set DEFAULT_CFLAGS_GRAPHITE_SCOP "-O2 -fgraphite -fdump-tree-graphite-all"
+set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ]
+dg-runtest $scop_files "" $DEFAULT_CFLAGS_GRAPHITE_SCOP
+foreach scop_file $scop_files {lremove wait_to_run_files $scop_file}
+
+
+# Schedule now the tests to be run.
+set dg-do-what-default run
+
+# Flags using for run-id-* files.
+set DEFAULT_CFLAGS_RUN_ID "-O2 -fgraphite-identity"
+set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ]
+dg-runtest $run_id_files "" $DEFAULT_CFLAGS_RUN_ID
+foreach run_id_file $run_id_files {lremove wait_to_run_files $run_id_file}
+
+
+# The default action for the rest of the files is 'compile'.
+set dg-do-what-default compile
+
+# Flags using for other files.
+set DEFAULT_CFLAGS_GRAPHITE "-ansi -pedantic-errors"
+dg-runtest $wait_to_run_files "" $DEFAULT_CFLAGS_GRAPHITE
 
 # Clean up.
 set dg-do-what-default ${save-dg-do-what-default}