[GOOGLE] Sets cgraph_node count during annotation

Xinliang David Li davidxl@google.com
Thu Sep 19 23:25:00 GMT 2013


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;



More information about the Gcc-patches mailing list