Hi,

This patch removes unnecessary edge probability calculations in
afdo_propagate_circuit() that would eventually be overridden by
afdo_calculate_branch_prob().

This would pave the way for my next patch, which compares the
estimated branch probabilities or the branch annotations against the
real profile data.

Thanks,
Yi

gcc/

2014-06-24 Yi Yang <ahyan...@google.com>

        * auto-profile.c (afdo_propagate_circuit): Do not change edge
probabilities when propagating edge counts

diff --git gcc/auto-profile.c gcc/auto-profile.c
index 51e318d..74d3d1d 100644
--- gcc/auto-profile.c
+++ gcc/auto-profile.c
@@ -1328,16 +1328,9 @@ afdo_propagate_circuit (void)
  continue;
       total++;
       only_one = ep;
-      if (e->probability == 0 && (e->flags & EDGE_ANNOTATED) == 0)
- {
-  ep->probability = 0;
-  ep->count = 0;
-  ep->flags |= EDGE_ANNOTATED;
- }
     }
   if (total == 1 && (only_one->flags & EDGE_ANNOTATED) == 0)
     {
-      only_one->probability = e->probability;
       only_one->count = e->count;
       only_one->flags |= EDGE_ANNOTATED;
     }
--

Reply via email to