[Bug c++/45605] Missed devirtualization

2010-09-20 Thread hubicka at gcc dot gnu dot org
--- Comment #20 from hubicka at gcc dot gnu dot org 2010-09-20 15:48 --- Subject: Bug 45605 Author: hubicka Date: Mon Sep 20 15:48:42 2010 New Revision: 164438 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164438 Log: PR tree-optimize/45605 * cgraph.h

[Bug c++/45605] Missed devirtualization

2010-09-20 Thread hubicka at gcc dot gnu dot org
--- Comment #21 from hubicka at gcc dot gnu dot org 2010-09-20 15:53 --- OK, we now fold the testcase using obj_type_ref folding. We still should do it via vtable lookup and we don't but that is for other PR I guess. -- hubicka at gcc dot gnu dot org changed: What

[Bug c++/45605] Missed devirtualization

2010-09-18 Thread hubicka at gcc dot gnu dot org
--- Comment #19 from hubicka at gcc dot gnu dot org 2010-09-18 21:25 --- Subject: Bug 45605 Author: hubicka Date: Sat Sep 18 21:25:29 2010 New Revision: 164402 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164402 Log: PR tree-optimization/45605 * cgraphunit.c

[Bug c++/45605] Missed devirtualization

2010-09-17 Thread jamborm at gcc dot gnu dot org
--- Comment #18 from jamborm at gcc dot gnu dot org 2010-09-17 14:46 --- Honza submitted a patch (http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01369.html) so I guess it is his PR now :-) -- jamborm at gcc dot gnu dot org changed: What|Removed

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread rguenther at suse dot de
--- Comment #10 from rguenther at suse dot de 2010-09-16 08:50 --- Subject: Re: Missed devirtualization On Wed, 15 Sep 2010, hubicka at ucw dot cz wrote: --- Comment #9 from hubicka at ucw dot cz 2010-09-15 22:39 --- Subject: Re: Missed devirtualization We fold a stmt

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread hubicka at gcc dot gnu dot org
--- Comment #11 from hubicka at gcc dot gnu dot org 2010-09-16 12:25 --- Hmm, so do you have any idea where folding should be added for this particular case? It always seemed to me that it would make sense to add verifier that all statements are folded (locally, not by looking at SSA

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread rguenther at suse dot de
--- Comment #12 from rguenther at suse dot de 2010-09-16 12:31 --- Subject: Re: Missed devirtualization On Thu, 16 Sep 2010, hubicka at gcc dot gnu dot org wrote: --- Comment #11 from hubicka at gcc dot gnu dot org 2010-09-16 12:25 --- Hmm, so do you have any idea where

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread hubicka at ucw dot cz
--- Comment #13 from hubicka at ucw dot cz 2010-09-16 12:48 --- Subject: Re: Missed devirtualization I'm lost in this PR - for what testcase what statement needs folding (and what pending patches do I need to apply to see that)? PR is tracking missed optimization in the testcase in

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread rguenther at suse dot de
--- Comment #14 from rguenther at suse dot de 2010-09-16 12:51 --- Subject: Re: Missed devirtualization On Thu, 16 Sep 2010, hubicka at ucw dot cz wrote: --- Comment #13 from hubicka at ucw dot cz 2010-09-16 12:48 --- Subject: Re: Missed devirtualization I'm lost in

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread rguenth at gcc dot gnu dot org
--- Comment #15 from rguenth at gcc dot gnu dot org 2010-09-16 14:55 --- Like Index: gimplify.c === --- gimplify.c (revision 164333) +++ gimplify.c (working copy) @@ -2477,10 +2477,13 @@ gimplify_call_expr (tree

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread jamborm at gcc dot gnu dot org
--- Comment #16 from jamborm at gcc dot gnu dot org 2010-09-16 16:00 --- (In reply to comment #15) Like Index: gimplify.c === --- gimplify.c (revision 164333) +++ gimplify.c (working copy) @@ -2477,10 +2477,13 @@

[Bug c++/45605] Missed devirtualization

2010-09-16 Thread rguenther at suse dot de
--- Comment #17 from rguenther at suse dot de 2010-09-16 16:06 --- Subject: Re: Missed devirtualization On Thu, 16 Sep 2010, jamborm at gcc dot gnu dot org wrote: --- Comment #16 from jamborm at gcc dot gnu dot org 2010-09-16 16:00 --- (In reply to comment #15)

[Bug c++/45605] Missed devirtualization

2010-09-15 Thread jamborm at gcc dot gnu dot org
--- Comment #7 from jamborm at gcc dot gnu dot org 2010-09-15 18:42 --- Well, it turns out that fold_stmt_1 is never called on that statement (neither with -O -finline or -O2 or -O3). Where is it supposed to be called from? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45605

[Bug c++/45605] Missed devirtualization

2010-09-15 Thread rguenther at suse dot de
--- Comment #8 from rguenther at suse dot de 2010-09-15 19:09 --- Subject: Re: Missed devirtualization On Wed, 15 Sep 2010, jamborm at gcc dot gnu dot org wrote: --- Comment #7 from jamborm at gcc dot gnu dot org 2010-09-15 18:42 --- Well, it turns out that fold_stmt_1

[Bug c++/45605] Missed devirtualization

2010-09-15 Thread hubicka at ucw dot cz
--- Comment #9 from hubicka at ucw dot cz 2010-09-15 22:39 --- Subject: Re: Missed devirtualization We fold a stmt only if it is propagated to (by ccp, copyprop, forwprop, dom or by inlining). Well, since fold_stmt is stornger than what fe does, I guess we should fold each stmt at

[Bug c++/45605] Missed devirtualization

2010-09-10 Thread hubicka at gcc dot gnu dot org
--- Comment #6 from hubicka at gcc dot gnu dot org 2010-09-10 09:42 --- Subject: Bug 45605 Author: hubicka Date: Fri Sep 10 09:42:20 2010 New Revision: 164148 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164148 Log: PR tree-optimization/45605 * cp/class.c

[Bug c++/45605] Missed devirtualization

2010-09-09 Thread rguenther at suse dot de
--- Comment #2 from rguenther at suse dot de 2010-09-09 08:43 --- Subject: Re: New: Missed devirtualization On Thu, 9 Sep 2010, hubicka at gcc dot gnu dot org wrote: The following testcase taken from testsuite (and many others): // PR 14535 // { dg-do run } // { dg-options -O

[Bug c++/45605] Missed devirtualization

2010-09-09 Thread hubicka at gcc dot gnu dot org
--- Comment #3 from hubicka at gcc dot gnu dot org 2010-09-09 11:02 --- Hmm, is it? C equivalent IMO is: int a(void); typedef void (*ptr) (void); static const ptr array[1]={(ptr)a}; ptr t; main() { t=array[0]; } Here we have ctor represented as follows: nop_expr 0x76b53f30

[Bug c++/45605] Missed devirtualization

2010-09-09 Thread hubicka at gcc dot gnu dot org
--- Comment #4 from hubicka at gcc dot gnu dot org 2010-09-09 11:33 --- testing the following fix: Index: class.c === --- class.c (revision 163947) +++ class.c (working copy) @@ -7797,7 +7797,7 @@

[Bug c++/45605] Missed devirtualization

2010-09-09 Thread hubicka at gcc dot gnu dot org
--- Comment #5 from hubicka at gcc dot gnu dot org 2010-09-09 11:36 --- Created an attachment (id=21750) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21750action=view) WIP patch. Still misses some of Richi's earlier comments. --

[Bug c++/45605] Missed devirtualization

2010-09-08 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-09-09 01:17 --- I think this is the same issue as PR 19816. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45605