* [PATCH, testsuite]: Cleanup dumps @ 2015-01-31 15:38 Uros Bizjak [not found] ` <7B4175B2-2FAA-4A96-943B-06B379D03C75@gmail.com> 0 siblings, 1 reply; 12+ messages in thread From: Uros Bizjak @ 2015-01-31 15:38 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 822 bytes --] Hello! 2015-01-31 Uros Bizjak <ubizjak@gmail.com> * g++.dg/ipa/pr64146.C (dg-final): Cleanup icf ipa dump. * gcc.target/i386/chkp-builtins-1.c (dg-final): Cleanup chkp tree dump. * gcc.target/i386/chkp-builtins-2.c (dg-final): Ditto. * gcc.target/i386/chkp-builtins-3.c (dg-final): Ditto. * gcc.target/i386/chkp-builtins-4.c (dg-final): Ditto. * gcc.target/i386/chkp-const-check-1.c (dg-final): Cleanup chkopt tree dump. * gcc.target/i386/chkp-lifetime-1.c (dg-final): Ditto. * gcc.target/i386/chkp-remove-bndint-1.c (dg-final): Cleanup optimized tree dump. * gcc.target/i386/chkp-remove-bndint-2.c (dg-final): Ditto. * gfortran.dg/goacc/private-1.f95 (dg-final): Cleanup omplower tree dump. Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. Uros. [-- Attachment #2: t.diff.txt --] [-- Type: text/plain, Size: 5064 bytes --] Index: g++.dg/ipa/pr64146.C =================================================================== --- g++.dg/ipa/pr64146.C (revision 220302) +++ g++.dg/ipa/pr64146.C (working copy) @@ -36,3 +36,4 @@ /* { dg-final { scan-ipa-dump-times "Declaration does not bind to currect definition." 2 "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 2" "icf" } } */ +/* { dg-final { cleanup-ipa-dump "icf" } } */ Index: gcc.target/i386/chkp-builtins-1.c =================================================================== --- gcc.target/i386/chkp-builtins-1.c (revision 220302) +++ gcc.target/i386/chkp-builtins-1.c (working copy) @@ -2,6 +2,7 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_init_ptr_bounds" "chkp" } } */ +/* { dg-final { cleanup-tree-dump "chkp" } } */ void * chkp_test (void *p) Index: gcc.target/i386/chkp-builtins-2.c =================================================================== --- gcc.target/i386/chkp-builtins-2.c (revision 220302) +++ gcc.target/i386/chkp-builtins-2.c (working copy) @@ -2,6 +2,7 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_copy_ptr_bounds" "chkp" } } */ +/* { dg-final { cleanup-tree-dump "chkp" } } */ void * chkp_test (void *p, void *q) Index: gcc.target/i386/chkp-builtins-3.c =================================================================== --- gcc.target/i386/chkp-builtins-3.c (revision 220302) +++ gcc.target/i386/chkp-builtins-3.c (working copy) @@ -2,6 +2,7 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_set_ptr_bounds" "chkp" } } */ +/* { dg-final { cleanup-tree-dump "chkp" } } */ void * chkp_test (void *p) Index: gcc.target/i386/chkp-builtins-4.c =================================================================== --- gcc.target/i386/chkp-builtins-4.c (revision 220302) +++ gcc.target/i386/chkp-builtins-4.c (working copy) @@ -2,6 +2,7 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_null_ptr_bounds" "chkp" } } */ +/* { dg-final { cleanup-tree-dump "chkp" } } */ void * chkp_test (void *p) Index: gcc.target/i386/chkp-const-check-1.c =================================================================== --- gcc.target/i386/chkp-const-check-1.c (revision 220302) +++ gcc.target/i386/chkp-const-check-1.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */ /* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */ /* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */ +/* { dg-final { cleanup-tree-dump "chkpopt" } } */ - int test (int *p) { p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int)); Index: gcc.target/i386/chkp-lifetime-1.c =================================================================== --- gcc.target/i386/chkp-lifetime-1.c (revision 220302) +++ gcc.target/i386/chkp-lifetime-1.c (working copy) @@ -2,6 +2,7 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */ /* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */ +/* { dg-final { cleanup-tree-dump "chkpopt" } } */ extern int arr[]; Index: gcc.target/i386/chkp-remove-bndint-1.c =================================================================== --- gcc.target/i386/chkp-remove-bndint-1.c (revision 220302) +++ gcc.target/i386/chkp-remove-bndint-1.c (working copy) @@ -2,8 +2,8 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized" } */ /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ - struct S { int a; Index: gcc.target/i386/chkp-remove-bndint-2.c =================================================================== --- gcc.target/i386/chkp-remove-bndint-2.c (revision 220302) +++ gcc.target/i386/chkp-remove-bndint-2.c (working copy) @@ -2,8 +2,8 @@ /* { dg-require-effective-target mpx } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */ /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ - struct S { int a; Index: gfortran.dg/goacc/private-1.f95 =================================================================== --- gfortran.dg/goacc/private-1.f95 (revision 220302) +++ gfortran.dg/goacc/private-1.f95 (working copy) @@ -35,3 +35,4 @@ ! { dg-final { scan-tree-dump-times "private\\(i\\)" 3 "omplower" } } ! { dg-final { scan-tree-dump-times "private\\(j\\)" 2 "omplower" } } ! { dg-final { scan-tree-dump-times "private\\(k\\)" 1 "omplower" } } +! { dg-final { cleanup-tree-dump "omplower" } } ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <7B4175B2-2FAA-4A96-943B-06B379D03C75@gmail.com>]
[parent not found: <4420E8FB-D61F-4F61-8A86-6ADE01B235E9@comcast.net>]
[parent not found: <FFFCE31D-72C2-4542-9A1D-2C67E8DE07D8@gmail.com>]
[parent not found: <089F97D9-DDFA-420E-8BCA-353F704B0A94@gmail.com>]
* Re: [PATCH, testsuite]: Cleanup dumps [not found] ` <089F97D9-DDFA-420E-8BCA-353F704B0A94@gmail.com> @ 2015-02-01 17:50 ` Mike Stump 2015-04-23 8:24 ` Bernhard Reutner-Fischer 0 siblings, 1 reply; 12+ messages in thread From: Mike Stump @ 2015-02-01 17:50 UTC (permalink / raw) To: Bernhard Reutner-Fischer; +Cc: Uros Bizjak, gcc-patches On Jan 31, 2015, at 1:55 PM, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > > What about the -Wcomment question? I don’t consider it linked in anyway to the patch at hand. I’m not a big fan of the default flags being much different than the flags the user normally sees. That said, would be nice to avoid this issue. The best way forward I can think of would be a wholesale change to // style comments in the test suite for all test cases that accept that language. // is standard C and C++, and by convention, I think they are fine in Objective-C and Obective-C++. > And can you help with the two ??? maybe? Which type of help? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps 2015-02-01 17:50 ` Mike Stump @ 2015-04-23 8:24 ` Bernhard Reutner-Fischer 2015-05-28 9:48 ` [PATCH] auto-wipe dump files, part1, manual stuff Bernhard Reutner-Fischer 0 siblings, 1 reply; 12+ messages in thread From: Bernhard Reutner-Fischer @ 2015-04-23 8:24 UTC (permalink / raw) To: Mike Stump; +Cc: Uros Bizjak, gcc-patches On 1 February 2015 at 18:49, Mike Stump <mikestump@comcast.net> wrote: > On Jan 31, 2015, at 1:55 PM, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: >> >> What about the -Wcomment question? > > I don’t consider it linked in anyway to the patch at hand. I’m not a big fan of the default flags being much different than the flags the user normally sees. That said, would be nice to avoid this issue. The best way forward I can think of would be a wholesale change to // style comments in the test suite for all test cases that accept that language. // is standard C and C++, and by convention, I think they are fine in Objective-C and Obective-C++. I won't do a wholesale change to C++-style comments in the testsuite (where applicable), that's too time-consuming. Since you OKed the patch cited below, i suggest i apply those hunks of the manual patch that are still relevant since i think they make sense regardless of the auto-wipe dumpfiles stuff going in or not. > >> And can you help with the two ??? maybe? > > Which type of help? In the last posted patch https://gcc.gnu.org/ml/gcc-patches/2013-12/msg01749.html there is only one question left: + foreach src $testcases { + set basename [file tail $src] + if { $ltrans != "" } { + # ??? should we use upvar 1 output_file instead of this (dup ?) + set stem [file rootname $basename] + set basename_ext [file extension $basename] + if {$basename_ext != ""} { + regsub -- {^.*\.} $basename_ext {} basename_ext + } + lappend tfiles "$stem.{$basename_ext,exe}" + unset basename_ext + } else { + lappend tfiles $basename + } + } I wasn't sure if upvar 1 output_file would globally work? WDYT? PS: IIRC someone from codesourcery meanwhile fixed the pch test objects leftovers so the * lib/dg-pch.exp(pch-init): Remove pch-check objects. is obsolete by now. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] auto-wipe dump files, part1, manual stuff 2015-04-23 8:24 ` Bernhard Reutner-Fischer @ 2015-05-28 9:48 ` Bernhard Reutner-Fischer 0 siblings, 0 replies; 12+ messages in thread From: Bernhard Reutner-Fischer @ 2015-05-28 9:48 UTC (permalink / raw) To: gcc-patches; +Cc: Bernhard Reutner-Fischer, Mike Stump Ontop of this patch you would have to git grep -l -E "(cleanup-.*-dump|cleanup-saved-temps)" \ | egrep -v "(ChangeLog|/lib/)" \ | sed -e "s|[^/]*$||" | sort | uniq \ | while read d; do find $d -type f -exec \ sed -i -e "/cleanup-[^-]*[-]*dump/d;/cleanup-saved-temps/d" {} + done --- I had to add dg-keep-saved-temps for the following two testcases: g++.dg/pch/pch.C gcc.dg/pch/save-temps-1.c The following testcases had /* { dg-final { cleanup-saved-temps "ivopts" } } */ resp cleanup-saved-temps "pr43597" or "[dt][fi]mode_off" which does nothing AFAICT and thus will be removed by above sed. gcc.target/arm/ivopts-2.c gcc.target/arm/ivopts-3.c gcc.target/arm/ivopts-4.c gcc.target/arm/ivopts-5.c gcc.target/arm/ivopts.c gcc.target/arm/pr43597.c gcc.target/powerpc/dfmode_off.c gcc.target/powerpc/dimode_off.c gcc.target/powerpc/tfmode_off.c gcc.target/powerpc/timode_off.c I do expect fallout for a couple of days when people push new testcases and don't have picked up the removal of the procs in their test-runs just yet. Since you, Mike, OKed the patch in gcc-5 stage-4 for the next stage1, i will commit this patch (plus the sed in the same revision) in a couple of hours. gcc/testsuite/ChangeLog 2015-05-28 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> * lib/gcc-dg.exp (cleanup-ipa-dump, cleanup-rtl-dump, cleanup-tree-dump, cleanup-dump, cleanup-saved-temps): Remove. Adjust all callers. (schedule-cleanups, dg-keep-saved-temps): New proc. (gcc-dg-test-1): Schedule cleanups. * lib/profopt.exp (profopt-execute): Likewise. * g++.dg/cdce3.C: Adjust expected line numbers. * gcc.dg/cdce1.c: Likewise. * gcc.dg/cdce2.c: Likewise. * gcc.dg/strlenopt-22.c: Fix comment delimiter. * gcc.dg/strlenopt-24.c: Likewise. * gcc.dg/tree-ssa/vrp26.c: Likewise. * gcc.dg/tree-ssa/vrp28.c: Likewise. * obj-c++.dg/encode-2.mm: Likewise. libgomp/ChangeLog 2015-05-28 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> * testsuite/libgomp.graphite/bounds.c: Adjust for cleanup-tree-dump removal. * testsuite/libgomp.graphite/force-parallel-1.c: Likewise. * testsuite/libgomp.graphite/force-parallel-2.c: Likewise. * testsuite/libgomp.graphite/force-parallel-3.c: Likewise. * testsuite/libgomp.graphite/force-parallel-4.c: Likewise. * testsuite/libgomp.graphite/force-parallel-5.c: Likewise. * testsuite/libgomp.graphite/force-parallel-6.c: Likewise. * testsuite/libgomp.graphite/force-parallel-7.c: Likewise. * testsuite/libgomp.graphite/force-parallel-8.c: Likewise. * testsuite/libgomp.graphite/force-parallel-9.c: Likewise. * testsuite/libgomp.graphite/pr41118.c: Likewise. gcc/ChangeLog 2015-05-28 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> * config/arm/neon-testgen.ml (emit_epilogue): Remove manual call to cleanup-saved-temps. gcc/doc/ChangeLog 2015-05-28 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> * doc/sourcebuild.texi (Clean up generated test files): Expand introduction. (cleanup-ipa-dump, cleanup-rtl-dump, cleanup-tree-dump, cleanup-saved-temps): Remove. (dg-keep-saved-temps): Document new proc. gcc/config/arm/neon-testgen.ml | 1 - gcc/doc/sourcebuild.texi | 30 +++--- gcc/testsuite/g++.dg/cdce3.C | 5 +- gcc/testsuite/g++.dg/pch/pch.C | 3 +- gcc/testsuite/gcc.dg/cdce1.c | 3 +- gcc/testsuite/gcc.dg/cdce2.c | 3 +- gcc/testsuite/gcc.dg/pch/save-temps-1.c | 3 +- gcc/testsuite/gcc.dg/strlenopt-22.c | 3 +- gcc/testsuite/gcc.dg/strlenopt-24.c | 3 +- gcc/testsuite/gcc.dg/tree-ssa/vrp26.c | 3 +- gcc/testsuite/gcc.dg/tree-ssa/vrp28.c | 3 +- gcc/testsuite/lib/gcc-dg.exp | 170 +++++++++++++++++++++++-------- gcc/testsuite/lib/profopt.exp | 3 + gcc/testsuite/obj-c++.dg/encode-2.mm | 3 +- 14 files changed, 157 insertions(+), 79 deletions(-) diff --git a/gcc/config/arm/neon-testgen.ml b/gcc/config/arm/neon-testgen.ml index 0a2a442..3164ab7 100644 --- a/gcc/config/arm/neon-testgen.ml +++ b/gcc/config/arm/neon-testgen.ml @@ -138,7 +138,6 @@ let emit_epilogue chan features regexps = else () ); - Printf.fprintf chan "/* { dg-final { cleanup-saved-temps } } */\n" (* Check a list of C types to determine which ones are pointers and which ones are const. *) diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index c6ef40e..cb41b01 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2210,13 +2210,17 @@ Check branch and/or call counts, in addition to line counts, in @subsubsection Clean up generated test files +Usually the test-framework removes files that were generated during +testing. If a testcase, for example, uses any dumping mechanism to +inspect a passes dump file, the testsuite recognized the dump option +passed to the tool and schedules a final cleanup to remove these files. + +There are, however, following additional cleanup directives that can be +used to annotate a testcase "manually". @table @code @item cleanup-coverage-files Removes coverage data files generated for this test. -@item cleanup-ipa-dump @var{suffix} -Removes IPA dump files generated for this test. - @item cleanup-modules "@var{list-of-extra-modules}" Removes Fortran module files generated for this test, excluding the module names listed in keep-modules. @@ -2251,21 +2255,23 @@ end module keep2 ! @{ dg-final @{ keep-modules "" @} @} ! keep all @end smallexample +@item dg-keep-saved-temps "@var{list-of-suffixes-not-to-delete}" +Whitespace separated list of suffixes that should not be deleted +automatically in a testcase that uses @option{-save-temps}. +@smallexample +// @{ dg-options "-save-temps -fpch-preprocess -I." @} +int main() @{ return 0; @} +// @{ dg-keep-saved-temps ".s" @} ! just keep assembler file +// @{ dg-keep-saved-temps ".s" ".i" @} ! ... and .i +// @{ dg-keep-saved-temps ".ii" ".o" @} ! or just .ii and .o +@end smallexample + @item cleanup-profile-file Removes profiling files generated for this test. @item cleanup-repo-files Removes files generated for this test for @option{-frepo}. -@item cleanup-rtl-dump @var{suffix} -Removes RTL dump files generated for this test. - -@item cleanup-saved-temps -Removes files for the current test which were kept for @option{-save-temps}. - -@item cleanup-tree-dump @var{suffix} -Removes tree dump files matching @var{suffix} which were generated for -this test. @end table @node Ada Tests diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C index 726e9ec..3937953 100644 --- a/gcc/testsuite/g++.dg/cdce3.C +++ b/gcc/testsuite/g++.dg/cdce3.C @@ -4,8 +4,9 @@ /* { dg-additional-options "-DLARGE_LONG_DOUBLE" { target large_long_double } } */ /* { dg-additional-options "-DGNU_EXTENSION" { target pow10 } } */ /* { dg-add-options ieee } */ +/* { dg-final { scan-tree-dump "cdce3.C:91: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */ /* { dg-final { scan-tree-dump "cdce3.C:92: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */ -/* { dg-final { scan-tree-dump "cdce3.C:93: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */ +/* { dg-final { scan-tree-dump "cdce3.C:94: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:97: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ @@ -19,8 +20,6 @@ /* { dg-final { scan-tree-dump "cdce3.C:105: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:106: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:107: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ -/* { dg-final { scan-tree-dump "cdce3.C:108: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ -/* { dg-final { cleanup-tree-dump "cdce" } } */ #include <stdlib.h> #include <math.h> diff --git a/gcc/testsuite/g++.dg/pch/pch.C b/gcc/testsuite/g++.dg/pch/pch.C index 9483efa..74d302e 100644 --- a/gcc/testsuite/g++.dg/pch/pch.C +++ b/gcc/testsuite/g++.dg/pch/pch.C @@ -5,5 +5,4 @@ int main() { return 0; } - -// { dg-final { cleanup-saved-temps ".s" } } +// { dg-keep-saved-temps ".s" } diff --git a/gcc/testsuite/gcc.dg/cdce1.c b/gcc/testsuite/gcc.dg/cdce1.c index 2123f7f..02b47c0 100644 --- a/gcc/testsuite/gcc.dg/cdce1.c +++ b/gcc/testsuite/gcc.dg/cdce1.c @@ -1,8 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */ /* { dg-require-effective-target int32plus } */ -/* { dg-final { scan-tree-dump "cdce1.c:17: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ -/* { dg-final { cleanup-tree-dump "cdce" } } */ +/* { dg-final { scan-tree-dump "cdce1.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-require-effective-target large_double } */ #include <stdlib.h> diff --git a/gcc/testsuite/gcc.dg/cdce2.c b/gcc/testsuite/gcc.dg/cdce2.c index a461ce7..55030f1 100644 --- a/gcc/testsuite/gcc.dg/cdce2.c +++ b/gcc/testsuite/gcc.dg/cdce2.c @@ -1,8 +1,7 @@ /* { dg-do run } */ /* { dg-skip-if "doubles are floats" { "avr-*-*" } { "*" } { "" } } */ /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */ -/* { dg-final { scan-tree-dump "cdce2.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } }*/ -/* { dg-final { cleanup-tree-dump "cdce" } } */ +/* { dg-final { scan-tree-dump "cdce2.c:15: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ #include <stdlib.h> #include <math.h> diff --git a/gcc/testsuite/gcc.dg/pch/save-temps-1.c b/gcc/testsuite/gcc.dg/pch/save-temps-1.c index 9a5e722..345b4a6 100644 --- a/gcc/testsuite/gcc.dg/pch/save-temps-1.c +++ b/gcc/testsuite/gcc.dg/pch/save-temps-1.c @@ -5,5 +5,4 @@ #endif #include <stddef.h> int x; - -/* { dg-final { cleanup-saved-temps ".s" } } */ +/* { dg-keep-saved-temps ".s" } */ diff --git a/gcc/testsuite/gcc.dg/strlenopt-22.c b/gcc/testsuite/gcc.dg/strlenopt-22.c index d6fd4df..aa55f5e 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-22.c +++ b/gcc/testsuite/gcc.dg/strlenopt-22.c @@ -36,5 +36,4 @@ main () /* { dg-final { scan-tree-dump-times "strcpy \\(" 1 "strlen" } } */ /* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */ /* { dg-final { scan-tree-dump-times "strchr \\(" 1 "strlen" } } */ -/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } * -/* { dg-final { cleanup-tree-dump "strlen" } } */ +/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */ diff --git a/gcc/testsuite/gcc.dg/strlenopt-24.c b/gcc/testsuite/gcc.dg/strlenopt-24.c index 962e04f..639501a 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-24.c +++ b/gcc/testsuite/gcc.dg/strlenopt-24.c @@ -13,5 +13,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } * -/* { dg-final { cleanup-tree-dump "strlen" } } */ +/* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp26.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp26.c index 6215416..021d2de 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp26.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp26.c @@ -9,8 +9,7 @@ foo(int a) } /* VRP should optimize this to a trivial "return 1". */ -/* { dg-final { scan-tree-dump-times "return 1" 1 "vrp1" } } * / -/* { dg-final { cleanup-tree-dump "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "return 1" 1 "vrp1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp28.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp28.c index 6b2a1fd..8c2a72b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp28.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp28.c @@ -26,7 +26,6 @@ int f3 (unsigned char c) return 0; } -/* { dg-final { scan-tree-dump-times "if " 0 "vrp1" } } * / -/* { dg-final { cleanup-tree-dump "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "if " 0 "vrp1" } } */ diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 4fa433d..9e4ecce 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -105,6 +105,108 @@ if [check_effective_target_lto] { } } +# Deduce generated files from tool flags, return finalcode string +proc schedule-cleanups { opts } { + global additional_sources + set finalcode "" + set testcases {} + lappend testcases [lindex [testname-for-summary] 0] + verbose "Cleanup testcases: $testcases" 4 + if { [info exists additional_sources] && $additional_sources != "" } { + lappend testcases $additional_sources + verbose "Cleanup testcases, additional: $additional_sources" 4 + } + verbose "Cleanup all options: $opts" 4 + + # First some fixups to transform stuff to something manageable .. + # --dump= should translate to -d with joined operand. + if [regexp -- {(^|\s+)--dump=[^\s]+(\s+|$)} $opts] { + regsub -all -- {--dump=} $opts {-d} opts + } + # -da and -dx are treated as shorthand for -fdump-rtl-all here + if [regexp -- {(^|\s+)-d[ax](\s+|$)} $opts] { + verbose "Cleanup -d seen" 4 + lappend opts "-fdump-rtl-all" + } + # .. and don't question why there is --dump=? and -d? + + # Then handle options that generate non-dump files + # TODO + # -fprofile-generate -> cleanup-coverage-files() + # -fstack-usage -> cleanup-stack-usage() + if [regexp -- {(^|\s+)-fstack-usage(\s+|$)} $opts] { + verbose "Cleanup -fstack-usage seen" 4 +# append finalcode "cleanup-stack-usage\n" + } + global keep_saved_temps_suffixes + if [info exists keep_saved_temps_suffixes ] { + verbose "dg-keep-saved-temps ${keep_saved_temps_suffixes}" 2 + } + # -save-temps -> cleanup-saved-temps() + if [regexp -- {(^|\s+)-save-temps(\s+|$)} $opts] { + verbose "Cleanup -save-temps seen" 4 + if [info exists keep_saved_temps_suffixes] { + append finalcode "cleanup-saved-temps ${keep_saved_temps_suffixes}\n" + } else { + append finalcode "cleanup-saved-temps\n" + } + } else { + if [info exists keep_saved_temps_suffixes ] { + error "dg-keep-saved-temps specified but testcase does not -save-temps" + return + } + } + # Finally see if there are any dumps in opts, otherwise we are done + if [regexp -- {(?=(?:^|[ \t]+)?)-fdump-[^ \t]+(?=(?:$|[ \t]+)?)} $opts] { + # Ipa, Rtl, Tree for simplicity + set ptn "{i,r,t}" + } else { + return $finalcode + } + # stem.ext.<passnum><fam>.<passname><pass-instances> + # (tree)passes can have multiple instances, thus optional trailing * + set ptn "\[0-9\]\[0-9\]\[0-9\]$ptn.*" + # Handle ltrans files around -flto + if [regexp -- {(^|\s+)-flto(\s+|$)} $opts] { + verbose "Cleanup -flto seen" 4 + set ltrans "{ltrans\[0-9\]*.,}" + } else { + set ltrans "" + } + set ptn "$ltrans$ptn" + verbose "Cleanup final ptn: $ptn" 4 + set tfiles {} + foreach src $testcases { + set basename [file tail $src] + if { $ltrans != "" } { + # ??? should we use upvar 1 output_file instead of this (dup ?) + set stem [file rootname $basename] + set basename_ext [file extension $basename] + if {$basename_ext != ""} { + regsub -- {^.*\.} $basename_ext {} basename_ext + } + lappend tfiles "$stem.{$basename_ext,exe}" + unset basename_ext + } else { + lappend tfiles $basename + } + } + if { [llength $tfiles] > 1 } { + set tfiles [join $tfiles ","] + set tfiles "{$tfiles}" + } + verbose "Cleanup final testcases: $tfiles" 4 + # We have to quote the regex + regsub -all {([][$^?+*()|\\{}])} "$tfiles.$ptn" {\\\1} ptn + set final "" + append final {remove-build-file } + append final "\"$ptn\"" + verbose "Cleanup final: $final" 4 + append finalcode "$final\n" + + return $finalcode +} + # Define gcc callbacks for dg.exp. proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { @@ -176,6 +278,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { } } + append finalcode [schedule-cleanups "$options $extra_tool_flags"] if { $extra_tool_flags != "" } { lappend options "additional_flags=$extra_tool_flags" } @@ -527,27 +630,6 @@ proc cleanup-repo-files { } { } } -# Remove compiler-generated RTL dump files for the current test. -# -# SUFFIX is the filename suffix pattern. -proc cleanup-rtl-dump { suffix } { - cleanup-dump "\[0-9\]\[0-9\]\[0-9\]r.$suffix" -} - -# Remove a specific tree dump file for the current test. -# -# SUFFIX is the tree dump file suffix pattern. -proc cleanup-tree-dump { suffix } { - cleanup-dump "\[0-9\]\[0-9\]\[0-9\]t.$suffix" -} - -# Remove a specific ipa dump file for the current test. -# -# SUFFIX is the ipa dump file suffix pattern. -proc cleanup-ipa-dump { suffix } { - cleanup-dump "\[0-9\]\[0-9\]\[0-9\]i.$suffix" -} - # Remove a final insns dump file for the current test. proc cleanup-final-insns-dump { } { set testcase [testname-for-summary] @@ -592,30 +674,6 @@ proc cleanup-ada-spec { } { } } -# Remove all dump files with the provided suffix. -proc cleanup-dump { suffix } { - global additional_sources_used - set testcase [testname-for-summary] - # The name might include a list of options; extract the file name. - set src [file tail [lindex $testcase 0]] - remove-build-file "[file tail $src].$suffix" - remove-build-file "[file rootname [file tail $src]].exe.$suffix" - remove-build-file "[file rootname [file tail $src]].exe.ltrans\[0-9\]*.$suffix" - # -fcompare-debug dumps - remove-build-file "[file tail $src].gk.$suffix" - - # Clean up dump files for additional source files. - if [info exists additional_sources_used] { - foreach srcfile $additional_sources_used { - remove-build-file "[file tail $srcfile].$suffix" - remove-build-file "[file rootname [file tail $srcfile]].exe.$suffix" - remove-build-file "[file rootname [file tail $srcfile]].exe.ltrans\[0-9\]*.$suffix" - # -fcompare-debug dumps - remove-build-file "[file tail $srcfile].gk.$suffix" - } - } -} - # Remove files kept by --save-temps for the current test. # # Currently this is only .i, .ii, .s and .o files, but more can be added @@ -658,6 +716,24 @@ proc cleanup-saved-temps { args } { } } + +# Files to be kept after cleanup of --save-temps for the current test. +# ARGS is a list of suffixes to NOT delete. +proc dg-keep-saved-temps { args } { + global keep_saved_temps_suffixes + set keep_saved_temps_suffixes {} + + # add the to-be-kept suffixes + foreach suffix {".mii" ".ii" ".i" ".s" ".o" ".gkd" ".res" ".ltrans.out"} { + if {[lsearch $args $suffix] >= 0} { + lappend keep_saved_temps_suffixes $suffix + } + } + if { [llength keep_saved_temps_suffixes] < 1 } { + error "dg-keep-saved-temps ${args} did not match any known suffix" + } +} + # Scan Fortran modules for a given regexp. # # Argument 0 is the module name @@ -760,6 +836,7 @@ if { [info procs saved-dg-test] == [list] } { global shouldfail global testname_with_flags global set_target_env_var + global keep_saved_temps_suffixes if { [ catch { eval saved-dg-test $args } errmsg ] } { set saved_info $errorInfo @@ -785,6 +862,9 @@ if { [info procs saved-dg-test] == [list] } { if [info exists set_target_env_var] { unset set_target_env_var } + if [info exists keep_saved_temps_suffixes] { + unset keep_saved_temps_suffixes + } unset_timeout_vars if [info exists compiler_conditional_xfail_data] { unset compiler_conditional_xfail_data diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp index 027ae9d..7d658b4 100644 --- a/gcc/testsuite/lib/profopt.exp +++ b/gcc/testsuite/lib/profopt.exp @@ -304,6 +304,9 @@ proc profopt-execute { src } { return } + # schedule removal of dump files et al + # Do this before the call below destroys additional_sources.. + append use_final_code [schedule-cleanups "$option $extra_flags"] set extra_options [dg-additional-files-options "" "$src"] # Remove old profiling data files. Make sure additional_sources_used is diff --git a/gcc/testsuite/obj-c++.dg/encode-2.mm b/gcc/testsuite/obj-c++.dg/encode-2.mm index 157bb52..77eb6ad 100644 --- a/gcc/testsuite/obj-c++.dg/encode-2.mm +++ b/gcc/testsuite/obj-c++.dg/encode-2.mm @@ -24,5 +24,4 @@ const char *enc3 = @encode(anonymous); /* { dg-final { scan-assembler "{Vec<float>=ffi}" } } */ /* { dg-final { scan-assembler "{Vec<double>=ddi}" } } */ -/* { dg-final { scan-file "encode-2.o" "{?={Vec<double>=ddi}{Vec<float>=ffi}fd{Vec<signed char>=cci}i}" } } -/* { dg-final cleanup-saved-temps } */ +/* { dg-final { scan-file "encode-2.o" "{?={Vec<double>=ddi}{Vec<float>=ffi}fd{Vec<signed char>=cci}i}" } } */ -- 1.7.10.4 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps [not found] ` <FFFCE31D-72C2-4542-9A1D-2C67E8DE07D8@gmail.com> [not found] ` <089F97D9-DDFA-420E-8BCA-353F704B0A94@gmail.com> @ 2015-05-29 8:44 ` Bernhard Reutner-Fischer 2015-05-29 10:08 ` Bernhard Reutner-Fischer 2015-05-29 13:33 ` Kyrill Tkachov 1 sibling, 2 replies; 12+ messages in thread From: Bernhard Reutner-Fischer @ 2015-05-29 8:44 UTC (permalink / raw) To: Mike Stump; +Cc: Uros Bizjak, gcc-patches On 31 January 2015 at 22:10, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > On January 31, 2015 9:17:57 PM GMT+01:00, Mike Stump <mikestump@comcast.net> wrote: >>On Jan 31, 2015, at 11:50 AM, Bernhard Reutner-Fischer >><rep.dot.nop@gmail.com> wrote: >>> On January 31, 2015 10:53:39 AM GMT+01:00, Uros Bizjak >><ubizjak@gmail.com> wrote: >>>> Hello! >>> >>> Reminds me of just auto-wiping dump files: >>> https://gcc.gnu.org/ml/gcc-patches/2013-10/msg02506.html >> >>> Mike, WDYT? >> >>Ok. >> >>My only concern of speed isn’t founded, as you stated it was faster to >>scan the flags. >> >>I think I’m fine with it going in now, but, if you do, you have to >>watch for and resolve any fallout. Watch for RM comments, I’d defer to >>them on timing. >> >>If you want to wait until stage 1, that’s fine too. > > I'd only want that to go in in stage 1. I have applied this now as r223858. Please CC me on fallout. Thanks, ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps 2015-05-29 8:44 ` [PATCH, testsuite]: Cleanup dumps Bernhard Reutner-Fischer @ 2015-05-29 10:08 ` Bernhard Reutner-Fischer 2022-04-25 21:34 ` Bernhard Reutner-Fischer 2015-05-29 13:33 ` Kyrill Tkachov 1 sibling, 1 reply; 12+ messages in thread From: Bernhard Reutner-Fischer @ 2015-05-29 10:08 UTC (permalink / raw) To: Mike Stump; +Cc: Uros Bizjak, gcc-patches On 29 May 2015 at 10:21, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > On 31 January 2015 at 22:10, Bernhard Reutner-Fischer > <rep.dot.nop@gmail.com> wrote: >> On January 31, 2015 9:17:57 PM GMT+01:00, Mike Stump <mikestump@comcast.net> wrote: >>>If you want to wait until stage 1, that’s fine too. >> >> I'd only want that to go in in stage 1. > > I have applied this now as r223858. > Please CC me on fallout. To recap: The idea is to automatically delete dump-files in the testsuite instead of annotating alot of testcases in their dg-final. To quote sourcebuild.texi, "Clean up generated test files": --- 8< --- Usually the test-framework removes files that were generated during testing. If a testcase, for example, uses any dumping mechanism to inspect a passes dump file, the testsuite recognized the dumping option passed to the tool and schedules a final cleanup to remove these files. --- 8< --- The following TCL procs were deleted from the test framework and CANNOT be used anymore in dg-final: - cleanup-ipa-dump - cleanup-rtl-dump - cleanup-tree-dump - cleanup-saved-temps These dump-files are now automatically deleted in the testsuite, via a schedule-cleanups in some basic .exp helpers. Just delete any // dg-final { cleanup-see-above-list } from your new testcases. The .plan is to gradually do the same for the remaining dumps like stack etc. See remaining parts in sourcebuild.texi and this comment in schedule-cleanups: + # TODO + # -fprofile-generate -> cleanup-coverage-files() + # -fstack-usage -> cleanup-stack-usage() Mike, just so i do not forget: I have retained the cleanup-saved-temps proc for now since it's used in lto.exp. I want to rename it later on to prevent people from using it in their dg-final since this is now done automatically. cheers, ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps 2015-05-29 10:08 ` Bernhard Reutner-Fischer @ 2022-04-25 21:34 ` Bernhard Reutner-Fischer 0 siblings, 0 replies; 12+ messages in thread From: Bernhard Reutner-Fischer @ 2022-04-25 21:34 UTC (permalink / raw) To: Mike Stump; +Cc: rep.dot.nop, Uros Bizjak, gcc-patches On Fri, 29 May 2015 10:44:02 +0200 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > On 29 May 2015 at 10:21, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > > On 31 January 2015 at 22:10, Bernhard Reutner-Fischer > > <rep.dot.nop@gmail.com> wrote: > >> On January 31, 2015 9:17:57 PM GMT+01:00, Mike Stump <mikestump@comcast.net> wrote: > > >>>If you want to wait until stage 1, that’s fine too. > >> > >> I'd only want that to go in in stage 1. > > > > I have applied this now as r223858. > > Please CC me on fallout. > > > To recap: > > The idea is to automatically delete dump-files in the testsuite > instead of annotating alot of testcases in their dg-final. > > To quote sourcebuild.texi, "Clean up generated test files": > --- 8< --- > Usually the test-framework removes files that were generated during > testing. If a testcase, for example, uses any dumping mechanism to > inspect a passes dump file, the testsuite recognized the dumping option > passed to the tool and schedules a final cleanup to remove these files. > --- 8< --- > > The following TCL procs were deleted from the test framework and > CANNOT be used anymore in dg-final: > - cleanup-ipa-dump > - cleanup-rtl-dump > - cleanup-tree-dump > - cleanup-saved-temps > > These dump-files are now automatically deleted in the testsuite, via a > schedule-cleanups in some basic .exp helpers. > > Just delete any // dg-final { cleanup-see-above-list } > from your new testcases. > > > The .plan is to gradually do the same for the remaining dumps like > stack etc. See remaining parts in sourcebuild.texi and this comment in > schedule-cleanups: > + # TODO > + # -fprofile-generate -> cleanup-coverage-files() > + # -fstack-usage -> cleanup-stack-usage() > > Mike, just so i do not forget: > > I have retained the cleanup-saved-temps proc for now since it's used in lto.exp. > I want to rename it later on to prevent people from using it in their > dg-final since this is now done automatically. > > cheers, Hi! Some time later now. We're in gcc-12 stage 4. The automatic cleanup handling was quite successful i think. I.e. folks did not have to waste any noteworthy time on manual cleanup hunting ever since then AFAIK. So.. Iff you find leftovers in the testsuite in gcc-12 or 11 onwards from running tests, then please let us know. And if you are willing to delve into removing the tcl leftovers from way back, or if you have time to apply some more TLC to the cleanup handling itself or if you see opportunity to cleanup the cleanup handling itself, then please do so. IIRC there are a few bits left that one could handle automatically, if deemed generally useful and if you have spare time. PS: $ git grep dg-final gcc/testsuite/ | egrep -v "(ChangeLog| scan-)" | sed -e 's/.*dg-final //' -e 's/\s*{\s*//' -e 's/}/ /g' | awk '{print $1}' | sort | uniq -c | sort -nr -k1 2697 check-function-bodies 486 gdb-test 62 run-gcov 34 scan-assembler-times 25 cleanup-ada-spec 23 simulate-thread 22 object-size ... PS: gcc/testsuite/lib/scanasm.exp: object-size is under-used. We should have way more size tests. And we should have size tests that aim to regain the regressions that came with the SSA merge ;) thanks, ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps 2015-05-29 8:44 ` [PATCH, testsuite]: Cleanup dumps Bernhard Reutner-Fischer 2015-05-29 10:08 ` Bernhard Reutner-Fischer @ 2015-05-29 13:33 ` Kyrill Tkachov 2015-05-29 13:38 ` Bernhard Reutner-Fischer 1 sibling, 1 reply; 12+ messages in thread From: Kyrill Tkachov @ 2015-05-29 13:33 UTC (permalink / raw) To: Bernhard Reutner-Fischer; +Cc: gcc-patches [-- Attachment #1: Type: text/plain, Size: 1279 bytes --] On 29/05/15 09:21, Bernhard Reutner-Fischer wrote: > On 31 January 2015 at 22:10, Bernhard Reutner-Fischer > <rep.dot.nop@gmail.com> wrote: >> On January 31, 2015 9:17:57 PM GMT+01:00, Mike Stump <mikestump@comcast.net> wrote: >>> On Jan 31, 2015, at 11:50 AM, Bernhard Reutner-Fischer >>> <rep.dot.nop@gmail.com> wrote: >>>> On January 31, 2015 10:53:39 AM GMT+01:00, Uros Bizjak >>> <ubizjak@gmail.com> wrote: >>>>> Hello! >>>> Reminds me of just auto-wiping dump files: >>>> https://gcc.gnu.org/ml/gcc-patches/2013-10/msg02506.html >>>> Mike, WDYT? >>> Ok. >>> >>> My only concern of speed isn’t founded, as you stated it was faster to >>> scan the flags. >>> >>> I think I’m fine with it going in now, but, if you do, you have to >>> watch for and resolve any fallout. Watch for RM comments, I’d defer to >>> them on timing. >>> >>> If you want to wait until stage 1, that’s fine too. >> I'd only want that to go in in stage 1. > I have applied this now as r223858. > Please CC me on fallout. Hi Bernhard, You asked to be CC'ed ;) Applied this as obvious with r223864 to. Kyrill 2015-05-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * gcc.target/aarch64/vdup_lane_2.c: Close comment on final line. > > Thanks, > [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: aarch64-vdup_lane_2-close-comment.patch --] [-- Type: text/x-patch; name=aarch64-vdup_lane_2-close-comment.patch, Size: 595 bytes --] diff --git a/gcc/testsuite/gcc.target/aarch64/vdup_lane_2.c b/gcc/testsuite/gcc.target/aarch64/vdup_lane_2.c index e87d780..a49db3e 100644 --- a/gcc/testsuite/gcc.target/aarch64/vdup_lane_2.c +++ b/gcc/testsuite/gcc.target/aarch64/vdup_lane_2.c @@ -338,5 +338,5 @@ main () /* Asm check for vdupd_lane_f64, vdupd_lane_s64, vdupd_lane_u64. */ /* Attempts to make the compiler generate vdupd are not practical. */ -/* { dg-final { scan-assembler-not "dup\\td\[0-9\]+, v\[0-9\]+\.d\\\[0\\\]" } } +/* { dg-final { scan-assembler-not "dup\\td\[0-9\]+, v\[0-9\]+\.d\\\[0\\\]" } } */ ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps 2015-05-29 13:33 ` Kyrill Tkachov @ 2015-05-29 13:38 ` Bernhard Reutner-Fischer 2015-05-29 21:14 ` Christophe Lyon 0 siblings, 1 reply; 12+ messages in thread From: Bernhard Reutner-Fischer @ 2015-05-29 13:38 UTC (permalink / raw) To: Kyrill Tkachov; +Cc: gcc-patches On 29 May 2015 at 15:21, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote: > Hi Bernhard, > > You asked to be CC'ed ;) > Applied this as obvious with r223864 to. oops, thanks for fixing! This obviously escaped my grep-foo. As said, i'd vote for -Wcomment -fno-ident to be added per default where testcases should opt-out if they want to test these explicitly. It's stressful to be on a tailcall-fixups branch thinking that you might have broken something when you see scan-assembler-not "call" fail due to the .ident :P Anyway. Thanks, again! ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH, testsuite]: Cleanup dumps 2015-05-29 13:38 ` Bernhard Reutner-Fischer @ 2015-05-29 21:14 ` Christophe Lyon 0 siblings, 0 replies; 12+ messages in thread From: Christophe Lyon @ 2015-05-29 21:14 UTC (permalink / raw) To: Bernhard Reutner-Fischer; +Cc: Kyrill Tkachov, gcc-patches [-- Attachment #1: Type: text/plain, Size: 750 bytes --] On 29 May 2015 at 15:35, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > On 29 May 2015 at 15:21, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote: > >> Hi Bernhard, >> >> You asked to be CC'ed ;) >> Applied this as obvious with r223864 to. > Hi, Same problem with gcc/testsuite/gcc.target/arm/simd/vextp64_1.c fixed as obvious as r223876. > oops, thanks for fixing! This obviously escaped my grep-foo. > > As said, i'd vote for -Wcomment -fno-ident to be added per default > where testcases should opt-out if they want to test these explicitly. > It's stressful to be on a tailcall-fixups branch thinking that you > might have broken something when you see scan-assembler-not "call" > fail due to the .ident :P > > Anyway. Thanks, again! [-- Attachment #2: arm-vextp64_1.diff --] [-- Type: text/plain, Size: 859 bytes --] Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (revision 223875) +++ gcc/testsuite/ChangeLog (revision 223876) @@ -1,3 +1,7 @@ +2015-05-29 Christophe Lyon <christophe.lyon@linaro.org> + + * gcc.target/arm/simd/vextp64_1.c: Close comment on final line. + 2015-05-29 Dominik Vogt <vogt@linux.vnet.ibm.com> PR target/66215 Index: gcc/testsuite/gcc.target/arm/simd/vextp64_1.c =================================================================== --- gcc/testsuite/gcc.target/arm/simd/vextp64_1.c (revision 223875) +++ gcc/testsuite/gcc.target/arm/simd/vextp64_1.c (revision 223876) @@ -21,4 +21,4 @@ return 0; } -/* Don't scan assembler for vext - it can be optimized into a move from r0. +/* Don't scan assembler for vext - it can be optimized into a move from r0. */ ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH, testsuite]: Cleanup dumps @ 2014-11-04 18:21 Uros Bizjak 0 siblings, 0 replies; 12+ messages in thread From: Uros Bizjak @ 2014-11-04 18:21 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 766 bytes --] Hello! 2014-11-04 Uros Bizjak <ubizjak@gmail.com> * g++.dg/ipa/devirt-44.C (dg-options): Remove -fdump-tree-optimized. * g++.dg/ipa/devirt-45.C (dg-options): Ditto. * g++.dg/tree-prof/morefunc.C (dg-final-use): Cleanup profile ipa dump. * g++.dg/tree-prof/reorder.C (dg-final-use): Ditto. * g++.dg/tree-prof/pr35545.C (dg-fina-use): Cleanup profile_estimate ipa dump. * gcc.dg/fold-reassoc-3.c (dg-final): Fix scan string. Cleanup original tree dump. * gcc.dg/tree-prof/20050826-2.c (dg-final-use): Cleanup dom1 tree dump. * gcc.dg/tree-prof/cmpsf-1.c (dg-final-use): Ditto. * gcc.dg/tree-ssa/pr61144.c (dg-final): Cleanup optimized tree dump. Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. Uros. [-- Attachment #2: t.diff.txt --] [-- Type: text/plain, Size: 3916 bytes --] Index: g++.dg/ipa/devirt-44.C =================================================================== --- g++.dg/ipa/devirt-44.C (revision 217089) +++ g++.dg/ipa/devirt-44.C (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining -fdump-tree-optimized" } */ +/* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining" } */ struct A { virtual int foo () {return 1;} int wrapfoo () {foo();} Index: g++.dg/ipa/devirt-45.C =================================================================== --- g++.dg/ipa/devirt-45.C (revision 217089) +++ g++.dg/ipa/devirt-45.C (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining -fdump-tree-optimized" } */ +/* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining" } */ struct A { virtual int foo () {return 1;} int wrapfoo () {foo();} Index: g++.dg/tree-prof/morefunc.C =================================================================== --- g++.dg/tree-prof/morefunc.C (revision 217089) +++ g++.dg/tree-prof/morefunc.C (working copy) @@ -52,4 +52,4 @@ } /* { dg-final-use { scan-ipa-dump-times "Indirect call -> direct call" 2 "profile" } } */ - +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ Index: g++.dg/tree-prof/pr35545.C =================================================================== --- g++.dg/tree-prof/pr35545.C (revision 217089) +++ g++.dg/tree-prof/pr35545.C (working copy) @@ -47,6 +47,6 @@ } /* { dg-final-use { scan-ipa-dump "Indirect call -> direct call" "profile_estimate" } } */ -/* { dg-final-use { cleanup-ipa-dump "profile" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile_estimate" } } */ /* { dg-final-use { scan-tree-dump-not "OBJ_TYPE_REF" "optimized" } } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ Index: g++.dg/tree-prof/reorder.C =================================================================== --- g++.dg/tree-prof/reorder.C (revision 217089) +++ g++.dg/tree-prof/reorder.C (working copy) @@ -45,4 +45,4 @@ } /* { dg-final-use { scan-ipa-dump-times "Indirect call -> direct call" 2 "profile" } } */ - +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ Index: gcc.dg/fold-reassoc-3.c =================================================================== --- gcc.dg/fold-reassoc-3.c (revision 217089) +++ gcc.dg/fold-reassoc-3.c (working copy) @@ -13,5 +13,5 @@ } /* { dg-final { scan-tree-dump-not " - " "original" } } */ -/* { dg-final { scan-tree-dump-not " \\\+ " "original" } } */ -/* { dg-final { cleanup-tree-dump "orginal" } } */ +/* { dg-final { scan-tree-dump-not " \\+ " "original" } } */ +/* { dg-final { cleanup-tree-dump "original" } } */ Index: gcc.dg/tree-prof/20050826-2.c =================================================================== --- gcc.dg/tree-prof/20050826-2.c (revision 217089) +++ gcc.dg/tree-prof/20050826-2.c (working copy) @@ -73,3 +73,4 @@ } /* { dg-final-use { scan-tree-dump-not "Invalid sum" "dom1"} } */ +/* { dg-final-use { cleanup-tree-dump "dom1" } } */ Index: gcc.dg/tree-prof/cmpsf-1.c =================================================================== --- gcc.dg/tree-prof/cmpsf-1.c (revision 217089) +++ gcc.dg/tree-prof/cmpsf-1.c (working copy) @@ -182,3 +182,4 @@ } /* { dg-final-use { scan-tree-dump-not "Invalid sum" "dom1"} } */ +/* { dg-final-use { cleanup-tree-dump "dom1" } } */ Index: gcc.dg/tree-ssa/pr61144.c =================================================================== --- gcc.dg/tree-ssa/pr61144.c (revision 217089) +++ gcc.dg/tree-ssa/pr61144.c (working copy) @@ -5,3 +5,4 @@ extern int foo __attribute__((__weak__, __alias__("dummy"))); int bar() { if (foo) return 1; return 0; } /* { dg-final { scan-tree-dump-not "return 0" "optimized"} } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH, testsuite ]: Cleanup dumps @ 2013-12-08 21:47 Uros Bizjak 0 siblings, 0 replies; 12+ messages in thread From: Uros Bizjak @ 2013-12-08 21:47 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 327 bytes --] Hello! 2013-12-08 Uros Bizjak <ubizjak@gmail.com> * gcc.dg/macro-fusion-1.c: Cleanup sched2 rtl dump. * gcc.dg/macro-fusion-2.c: Ditto. * gcc.dg/vect/vect-simd-clone-10a.c: Cleanup vect tree dump. * gcc.dg/vect/vect-simd-clone-12a.c: Ditto. Tested on x86_64-pc-linux-gnu, committed to mainline SVN. Uros. [-- Attachment #2: t.diff.txt --] [-- Type: text/plain, Size: 1882 bytes --] Index: gcc.dg/macro-fusion-1.c =================================================================== --- gcc.dg/macro-fusion-1.c (revision 205790) +++ gcc.dg/macro-fusion-1.c (working copy) @@ -1,6 +1,5 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -mtune=corei7 -fdump-rtl-sched2" } */ -/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */ int a[100]; @@ -11,3 +10,6 @@ sum += (0.5 + (a[i%100] - 128)); return sum; } + +/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */ +/* { dg-final { cleanup-rtl-dump "sched2" } } */ Index: gcc.dg/macro-fusion-2.c =================================================================== --- gcc.dg/macro-fusion-2.c (revision 205790) +++ gcc.dg/macro-fusion-2.c (working copy) @@ -1,6 +1,5 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -mtune=corei7-avx -fdump-rtl-sched2" } */ -/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */ int a[100]; @@ -14,3 +13,6 @@ } return sum; } + +/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */ +/* { dg-final { cleanup-rtl-dump "sched2" } } */ Index: gcc.dg/vect/vect-simd-clone-10a.c =================================================================== --- gcc.dg/vect/vect-simd-clone-10a.c (revision 205790) +++ gcc.dg/vect/vect-simd-clone-10a.c (working copy) @@ -15,3 +15,5 @@ { return a + b + c; } + +/* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc.dg/vect/vect-simd-clone-12a.c =================================================================== --- gcc.dg/vect/vect-simd-clone-12a.c (revision 205790) +++ gcc.dg/vect/vect-simd-clone-12a.c (working copy) @@ -15,3 +15,5 @@ { return a + b + c; } + +/* { dg-final { cleanup-tree-dump "vect" } } */ ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-04-25 21:35 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-01-31 15:38 [PATCH, testsuite]: Cleanup dumps Uros Bizjak [not found] ` <7B4175B2-2FAA-4A96-943B-06B379D03C75@gmail.com> [not found] ` <4420E8FB-D61F-4F61-8A86-6ADE01B235E9@comcast.net> [not found] ` <FFFCE31D-72C2-4542-9A1D-2C67E8DE07D8@gmail.com> [not found] ` <089F97D9-DDFA-420E-8BCA-353F704B0A94@gmail.com> 2015-02-01 17:50 ` Mike Stump 2015-04-23 8:24 ` Bernhard Reutner-Fischer 2015-05-28 9:48 ` [PATCH] auto-wipe dump files, part1, manual stuff Bernhard Reutner-Fischer 2015-05-29 8:44 ` [PATCH, testsuite]: Cleanup dumps Bernhard Reutner-Fischer 2015-05-29 10:08 ` Bernhard Reutner-Fischer 2022-04-25 21:34 ` Bernhard Reutner-Fischer 2015-05-29 13:33 ` Kyrill Tkachov 2015-05-29 13:38 ` Bernhard Reutner-Fischer 2015-05-29 21:14 ` Christophe Lyon -- strict thread matches above, loose matches on Subject: below -- 2014-11-04 18:21 Uros Bizjak 2013-12-08 21:47 [PATCH, testsuite ]: " Uros Bizjak
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).