public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Repeat main vect.exp tests with -flto
@ 2011-04-18 12:59 Richard Sandiford
  2011-04-18 13:14 ` Rainer Orth
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2011-04-18 12:59 UTC (permalink / raw)
  To: gcc-patches

This patchs makes us run the main C vect.exp tests twice, once with the
normal optimisation options and once with -flto added.  It's a simple
way of covering the LTO streaming of the new "internal" functions,
but it should be useful more generally.

The testsuite runs quickly (even cross), so an extra pass through
doesn't have much overhead.

Tested on x86_64-linux-gnu and arm-linux-gnueabi.  OK to install?

Richard


gcc/testsuite/
	* gcc.dg/vect/vect.exp: Run the main tests twice, one with -flto
	and once without.

Index: gcc/testsuite/gcc.dg/vect/vect.exp
===================================================================
--- gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 08:47:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 13:22:53.000000000 +0100
@@ -75,15 +75,16 @@ lappend DEFAULT_VECTCFLAGS "-fdump-tree-
 lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details"
 
 # Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
-	"" $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
-	"" $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
-        "" $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
-        "" $VECT_SLP_CFLAGS
-
+foreach flags {"" "-flto"} {
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
+	$flags $DEFAULT_VECTCFLAGS
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
+	$flags $DEFAULT_VECTCFLAGS
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
+        $flags $DEFAULT_VECTCFLAGS
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
+        $flags $VECT_SLP_CFLAGS
+}
 
 #### Tests with special options
 global SAVED_DEFAULT_VECTCFLAGS

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Repeat main vect.exp tests with -flto
  2011-04-18 12:59 Repeat main vect.exp tests with -flto Richard Sandiford
@ 2011-04-18 13:14 ` Rainer Orth
  2011-04-18 15:00   ` Richard Sandiford
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2011-04-18 13:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: richard.sandiford

Richard,

> +foreach flags {"" "-flto"} {
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
> +	$flags $DEFAULT_VECTCFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
> +	$flags $DEFAULT_VECTCFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
> +        $flags $DEFAULT_VECTCFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
> +        $flags $VECT_SLP_CFLAGS
> +}

I think you need to make sure that the target supports lto,
cf. check_effective_target_lto.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Repeat main vect.exp tests with -flto
  2011-04-18 13:14 ` Rainer Orth
@ 2011-04-18 15:00   ` Richard Sandiford
  2011-04-18 15:08     ` Rainer Orth
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2011-04-18 15:00 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>> +foreach flags {"" "-flto"} {
>> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
>> +	$flags $DEFAULT_VECTCFLAGS
>> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
>> +	$flags $DEFAULT_VECTCFLAGS
>> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
>> +        $flags $DEFAULT_VECTCFLAGS
>> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
>> +        $flags $VECT_SLP_CFLAGS
>> +}
>
> I think you need to make sure that the target supports lto,
> cf. check_effective_target_lto.

Good point.  How's this?  Tested as before.

Richard


gcc/testsuite/
	* gcc.dg/vect/vect.exp: Run the main tests twice, one with -flto
	and once without.

Index: gcc/testsuite/gcc.dg/vect/vect.exp
===================================================================
--- gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 08:47:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 14:51:40.000000000 +0100
@@ -75,15 +75,20 @@ lappend DEFAULT_VECTCFLAGS "-fdump-tree-
 lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details"
 
 # Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
-	"" $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
-	"" $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
-        "" $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
-        "" $VECT_SLP_CFLAGS
-
+set VECT_ADDITIONAL_FLAGS [list ""]
+if { [check_effective_target_lto] } {
+    lappend VECT_ADDITIONAL_FLAGS "-flto"
+}
+foreach flags $VECT_ADDITIONAL_FLAGS {
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
+	$flags $DEFAULT_VECTCFLAGS
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
+	$flags $DEFAULT_VECTCFLAGS
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
+        $flags $DEFAULT_VECTCFLAGS
+    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
+        $flags $VECT_SLP_CFLAGS
+}
 
 #### Tests with special options
 global SAVED_DEFAULT_VECTCFLAGS

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Repeat main vect.exp tests with -flto
  2011-04-18 15:00   ` Richard Sandiford
@ 2011-04-18 15:08     ` Rainer Orth
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer Orth @ 2011-04-18 15:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: richard.sandiford

Richard,

>> I think you need to make sure that the target supports lto,
>> cf. check_effective_target_lto.
>
> Good point.  How's this?  Tested as before.

looks good, thanks.

	Rainer


>
> Richard
>
>
> gcc/testsuite/
> 	* gcc.dg/vect/vect.exp: Run the main tests twice, one with -flto
> 	and once without.
>
> Index: gcc/testsuite/gcc.dg/vect/vect.exp
> ===================================================================
> --- gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 08:47:17.000000000 +0100
> +++ gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 14:51:40.000000000 +0100
> @@ -75,15 +75,20 @@ lappend DEFAULT_VECTCFLAGS "-fdump-tree-
>  lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details"
>  
>  # Main loop.
> -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
> -	"" $DEFAULT_VECTCFLAGS
> -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
> -	"" $DEFAULT_VECTCFLAGS
> -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
> -        "" $DEFAULT_VECTCFLAGS
> -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
> -        "" $VECT_SLP_CFLAGS
> -
> +set VECT_ADDITIONAL_FLAGS [list ""]
> +if { [check_effective_target_lto] } {
> +    lappend VECT_ADDITIONAL_FLAGS "-flto"
> +}
> +foreach flags $VECT_ADDITIONAL_FLAGS {
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
> +	$flags $DEFAULT_VECTCFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
> +	$flags $DEFAULT_VECTCFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
> +        $flags $DEFAULT_VECTCFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
> +        $flags $VECT_SLP_CFLAGS
> +}
>  
>  #### Tests with special options
>  global SAVED_DEFAULT_VECTCFLAGS

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-18 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 12:59 Repeat main vect.exp tests with -flto Richard Sandiford
2011-04-18 13:14 ` Rainer Orth
2011-04-18 15:00   ` Richard Sandiford
2011-04-18 15:08     ` Rainer Orth

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).