On Fri, Nov 22, 2013 at 3:27 PM, Dehao Chen <de...@google.com> wrote:
> This patch removes the zero_edge heuristic during profile propagation.
> The zero_edge heuristic does not seem to be effective in improving
> performance.
>
> Tested:
> Bootstrapped and passed regression test and performance test.
>
> OK for google-4_8?
>
> Thanks,
> Dehao
>
> Index: gcc/auto-profile.c
> ===================================================================
> --- gcc/auto-profile.c (revision 205232)
> +++ gcc/auto-profile.c (working copy)
> @@ -1122,7 +1122,7 @@ afdo_propagate_multi_edge (bool is_succ)
>
>    FOR_EACH_BB (bb)
>      {
> -      edge e, unknown_edge = NULL, zero_edge = NULL;
> +      edge e, unknown_edge = NULL;
>        edge_iterator ei;
>        int num_unknown_edge = 0;
>        gcov_type total_known_count = 0;
> @@ -1132,8 +1132,6 @@ afdo_propagate_multi_edge (bool is_succ)
>    FOR_EACH_EDGE (e, ei, bb->succs)
>      if ((e->flags & EDGE_ANNOTATED) == 0)
>        num_unknown_edge ++, unknown_edge = e;
> -    else if (e->count == 0)
> -      zero_edge = e;
>      else
>        total_known_count += e->count;
>   }

With this removal, you can now factor out the common branches of this
predicate.  Not needed for this patch, though. You had mentioned other
cleanups you wanted to do here.

Looks OK.


Thanks. Diego.

Reply via email to