diff mbox

Profile housekeeping 3/4 (call-cddce fix)

Message ID CABu31nMg8eVbOyu4ag9Oe=JaOeQZYVNwod6pqdAK6pvwejQHfQ@mail.gmail.com
State New
Headers show

Commit Message

Steven Bosscher Sept. 28, 2012, 8:47 p.m. UTC
On Fri, Sep 28, 2012 at 10:43 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> shrink_wrap_one_built_in_call forgets to update counts.

Hi,

Can you look at the one-liner from
http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00794.html too, please?

The patch there is this:


That looks correct to me, but you're much more familiar with this code
than I am :-)

Ciao!
Steven

Comments

Jan Hubicka Sept. 28, 2012, 9:03 p.m. UTC | #1
> On Fri, Sep 28, 2012 at 10:43 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > shrink_wrap_one_built_in_call forgets to update counts.
> 
> Hi,
> 
> Can you look at the one-liner from
> http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00794.html too, please?
> 
> The patch there is this:
> 
> Index: tree-ssa-tail-merge.c
> ===================================================================
> --- tree-ssa-tail-merge.c	(revision 191129)
> +++ tree-ssa-tail-merge.c	(working copy)
> @@ -1478,6 +1478,8 @@
>      bb2->frequency = BB_FREQ_MAX;
>    bb1->frequency = 0;
> 
> +  bb2->count += bb1->count;
> +
>    /* Do updates that use bb1, before deleting bb1.  */
>    release_last_vdef (bb1);
>    same_succ_flush_bb (bb1);
> 
> That looks correct to me, but you're much more familiar with this code
> than I am :-)

Yes, this one is obvoiusly correct.  Thanks for pointing it out.

Patch is OK.
Honza
> 
> Ciao!
> Steven
diff mbox

Patch

Index: tree-ssa-tail-merge.c
===================================================================
--- tree-ssa-tail-merge.c	(revision 191129)
+++ tree-ssa-tail-merge.c	(working copy)
@@ -1478,6 +1478,8 @@ 
     bb2->frequency = BB_FREQ_MAX;
   bb1->frequency = 0;

+  bb2->count += bb1->count;
+
   /* Do updates that use bb1, before deleting bb1.  */
   release_last_vdef (bb1);
   same_succ_flush_bb (bb1);