diff mbox

[GOOGLE] Sets cgraph_node count during annotation

Message ID CAO2gOZXSw=OqvX9nvS2FQv_iLO0y6nSKNvV5sjEyfMBx1F8xpw@mail.gmail.com
State New
Headers show

Commit Message

Dehao Chen Sept. 19, 2013, 8:15 p.m. UTC
This patch sets cgraph_node count during AutoFDO annotation, otherwise
execute_fixup_cfg will clear all the BB counts.

bootstrapped and passed regression test.

OK for google-4_8 branch?

Thanks,
Dehao

Comments

Xinliang David Li Sept. 19, 2013, 8:22 p.m. UTC | #1
Looks good.

David

On Thu, Sep 19, 2013 at 1:15 PM, Dehao Chen <dehao@google.com> wrote:
> This patch sets cgraph_node count during AutoFDO annotation, otherwise
> execute_fixup_cfg will clear all the BB counts.
>
> bootstrapped and passed regression test.
>
> OK for google-4_8 branch?
>
> Thanks,
> Dehao
>
> Index: gcc/auto-profile.c
> ===================================================================
> --- gcc/auto-profile.c (revision 202753)
> +++ gcc/auto-profile.c (working copy)
> @@ -1234,6 +1234,7 @@ afdo_annotate_cfg (void)
>
>    if (s == NULL)
>      return;
> +  cgraph_get_node (current_function_decl)->count = s->head_count ();
>    ENTRY_BLOCK_PTR->count = s->head_count ();
>    gcov_type max_count = ENTRY_BLOCK_PTR->count;
diff mbox

Patch

Index: gcc/auto-profile.c
===================================================================
--- gcc/auto-profile.c (revision 202753)
+++ gcc/auto-profile.c (working copy)
@@ -1234,6 +1234,7 @@  afdo_annotate_cfg (void)

   if (s == NULL)
     return;
+  cgraph_get_node (current_function_decl)->count = s->head_count ();
   ENTRY_BLOCK_PTR->count = s->head_count ();
   gcov_type max_count = ENTRY_BLOCK_PTR->count;