public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix inline-1.C and inline-3.C testcases
@ 2013-02-05 15:27 Jan Hubicka
  2013-02-05 15:52 ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Hubicka @ 2013-02-05 15:27 UTC (permalink / raw)
  To: gcc-patches

Hi,
I managed to get an accidental commit on those two testcases without an ChangeLog entry.
I just commit the missing ChangeLog and the following patch that should make them pass.

just in a case you wonder what are the tests about. I disabled iteration on early inliner
that makes it to mis some cases of indirect inlining that are now handled by later
inliner. The tree-ssa/inline-?.C testcases tests that early inliner with large enough
iteration counts still does the optimization, while ipa/inline-?.C are the same
testcases with no iteration and test that late inline picks the optimization too.

The motivation for the change was early inliner doing funny things on non-trivial recursion
especially with early-inlining-insns bumped up.

My apologizes,
Honza

Index: g++.dg/tree-ssa/inline-3.C
===================================================================
--- g++.dg/tree-ssa/inline-3.C	(revision 195751)
+++ g++.dg/tree-ssa/inline-3.C	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
+/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=5" } */
 /* { dg-add-options bind_pic_locally } */
 
 #include <algorithm>
Index: g++.dg/ipa/inline-1.C
===================================================================
--- g++.dg/ipa/inline-1.C	(revision 195751)
+++ g++.dg/ipa/inline-1.C	(working copy)
@@ -31,6 +31,6 @@ int main(int argc, char **argv)
   foreach (argv, argv + argc, inline_me_too);
 }
 
-/* { dg-final { scan-tree-dump-times "Considering void inline_me\\(" 1 "inline"} } */
-/* { dg-final { scan-tree-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
-/* { dg-final { cleanup-tree-dump "einline" } } */
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */

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

* Re: Fix inline-1.C and inline-3.C testcases
  2013-02-05 15:27 Fix inline-1.C and inline-3.C testcases Jan Hubicka
@ 2013-02-05 15:52 ` Jakub Jelinek
  2013-02-07  9:54   ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2013-02-05 15:52 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: gcc-patches

On Tue, Feb 05, 2013 at 04:27:15PM +0100, Jan Hubicka wrote:
> I managed to get an accidental commit on those two testcases without an ChangeLog entry.
> I just commit the missing ChangeLog and the following patch that should make them pass.
> 
> just in a case you wonder what are the tests about. I disabled iteration on early inliner
> that makes it to mis some cases of indirect inlining that are now handled by later
> inliner. The tree-ssa/inline-?.C testcases tests that early inliner with large enough
> iteration counts still does the optimization, while ipa/inline-?.C are the same
> testcases with no iteration and test that late inline picks the optimization too.
> 
> The motivation for the change was early inliner doing funny things on non-trivial recursion
> especially with early-inlining-insns bumped up.

Doesn't seem to be enough.

gcc/testsuite/g++.dg/ipa/inline-3.C
has
/* { dg-final { cleanup-tree-dump "inline" } } */
while supposedly it should have:
/* { dg-final { cleanup-ipa-dump "inline" } } */

Also,
gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
is now failing, supposedly it should have --param added ?

	Jakub

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

* Re: Fix inline-1.C and inline-3.C testcases
  2013-02-05 15:52 ` Jakub Jelinek
@ 2013-02-07  9:54   ` Jakub Jelinek
  2013-02-07 10:02     ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2013-02-07  9:54 UTC (permalink / raw)
  To: Richard Biener, Jan Hubicka; +Cc: gcc-patches

On Tue, Feb 05, 2013 at 04:51:36PM +0100, Jakub Jelinek wrote:
> On Tue, Feb 05, 2013 at 04:27:15PM +0100, Jan Hubicka wrote:
> > I managed to get an accidental commit on those two testcases without an ChangeLog entry.
> > I just commit the missing ChangeLog and the following patch that should make them pass.
> > 
> > just in a case you wonder what are the tests about. I disabled iteration on early inliner
> > that makes it to mis some cases of indirect inlining that are now handled by later
> > inliner. The tree-ssa/inline-?.C testcases tests that early inliner with large enough
> > iteration counts still does the optimization, while ipa/inline-?.C are the same
> > testcases with no iteration and test that late inline picks the optimization too.
> > 
> > The motivation for the change was early inliner doing funny things on non-trivial recursion
> > especially with early-inlining-insns bumped up.
> 
> Doesn't seem to be enough.
> 
> gcc/testsuite/g++.dg/ipa/inline-3.C
> has
> /* { dg-final { cleanup-tree-dump "inline" } } */
> while supposedly it should have:
> /* { dg-final { cleanup-ipa-dump "inline" } } */
> 
> Also,
> gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
> is now failing, supposedly it should have --param added ?

Now in a form of patch.  Tested on x86_64-linux, ok for trunk?

2013-02-07  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/55789
	* g++.dg/ipa/inline-3.C: Use cleanup-ipa-dump instead of
	cleanup-tree-dump.
	* gcc.dg/tree-ssa/inline-3.c: Add
	--param max-early-inliner-iterations=2 option.

--- gcc/testsuite/g++.dg/ipa/inline-3.C.jj	2013-02-05 12:06:08.000000000 +0100
+++ gcc/testsuite/g++.dg/ipa/inline-3.C	2013-02-07 10:51:46.619509404 +0100
@@ -26,4 +26,4 @@ int main(int argc, char **argv)
 
 /* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
 /* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
-/* { dg-final { cleanup-tree-dump "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/inline-3.c.jj	2010-10-07 19:44:57.000000000 +0200
+++ gcc/testsuite/gcc.dg/tree-ssa/inline-3.c	2013-02-07 10:51:00.653777552 +0100
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline" } */
+/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=2" } */
 /* { dg-add-options bind_pic_locally } */
 
 extern void inlined ();


	Jakub

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

* Re: Fix inline-1.C and inline-3.C testcases
  2013-02-07  9:54   ` Jakub Jelinek
@ 2013-02-07 10:02     ` Richard Biener
  2013-02-09  9:54       ` Jan Hubicka
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2013-02-07 10:02 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jan Hubicka, gcc-patches

On Thu, 7 Feb 2013, Jakub Jelinek wrote:

> On Tue, Feb 05, 2013 at 04:51:36PM +0100, Jakub Jelinek wrote:
> > On Tue, Feb 05, 2013 at 04:27:15PM +0100, Jan Hubicka wrote:
> > > I managed to get an accidental commit on those two testcases without an ChangeLog entry.
> > > I just commit the missing ChangeLog and the following patch that should make them pass.
> > > 
> > > just in a case you wonder what are the tests about. I disabled iteration on early inliner
> > > that makes it to mis some cases of indirect inlining that are now handled by later
> > > inliner. The tree-ssa/inline-?.C testcases tests that early inliner with large enough
> > > iteration counts still does the optimization, while ipa/inline-?.C are the same
> > > testcases with no iteration and test that late inline picks the optimization too.
> > > 
> > > The motivation for the change was early inliner doing funny things on non-trivial recursion
> > > especially with early-inlining-insns bumped up.
> > 
> > Doesn't seem to be enough.
> > 
> > gcc/testsuite/g++.dg/ipa/inline-3.C
> > has
> > /* { dg-final { cleanup-tree-dump "inline" } } */
> > while supposedly it should have:
> > /* { dg-final { cleanup-ipa-dump "inline" } } */
> > 
> > Also,
> > gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
> > is now failing, supposedly it should have --param added ?
> 
> Now in a form of patch.  Tested on x86_64-linux, ok for trunk?

Ok.

Thanks,
Richard.

> 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR tree-optimization/55789
> 	* g++.dg/ipa/inline-3.C: Use cleanup-ipa-dump instead of
> 	cleanup-tree-dump.
> 	* gcc.dg/tree-ssa/inline-3.c: Add
> 	--param max-early-inliner-iterations=2 option.
> 
> --- gcc/testsuite/g++.dg/ipa/inline-3.C.jj	2013-02-05 12:06:08.000000000 +0100
> +++ gcc/testsuite/g++.dg/ipa/inline-3.C	2013-02-07 10:51:46.619509404 +0100
> @@ -26,4 +26,4 @@ int main(int argc, char **argv)
>  
>  /* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
>  /* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
> -/* { dg-final { cleanup-tree-dump "inline" } } */
> +/* { dg-final { cleanup-ipa-dump "inline" } } */
> --- gcc/testsuite/gcc.dg/tree-ssa/inline-3.c.jj	2010-10-07 19:44:57.000000000 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/inline-3.c	2013-02-07 10:51:00.653777552 +0100
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-einline" } */
> +/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=2" } */
>  /* { dg-add-options bind_pic_locally } */
>  
>  extern void inlined ();
> 
> 
> 	Jakub
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend

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

* Re: Fix inline-1.C and inline-3.C testcases
  2013-02-07 10:02     ` Richard Biener
@ 2013-02-09  9:54       ` Jan Hubicka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Hubicka @ 2013-02-09  9:54 UTC (permalink / raw)
  To: Richard Biener; +Cc: Jakub Jelinek, Jan Hubicka, gcc-patches

> > > 
> > > gcc/testsuite/g++.dg/ipa/inline-3.C
> > > has
> > > /* { dg-final { cleanup-tree-dump "inline" } } */
> > > while supposedly it should have:
> > > /* { dg-final { cleanup-ipa-dump "inline" } } */
> > > 
> > > Also,
> > > gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
> > > is now failing, supposedly it should have --param added ?
> > 
> > Now in a form of patch.  Tested on x86_64-linux, ok for trunk?
> 
> Ok.

Oops, thank you!  Seems I forgot to commit this one, sorry for that.

Honza

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

end of thread, other threads:[~2013-02-09  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05 15:27 Fix inline-1.C and inline-3.C testcases Jan Hubicka
2013-02-05 15:52 ` Jakub Jelinek
2013-02-07  9:54   ` Jakub Jelinek
2013-02-07 10:02     ` Richard Biener
2013-02-09  9:54       ` Jan Hubicka

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