This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOOGLE] AutoFDO profile propagation should use all dominators


This patch updates the AutoFDO profile propagation of equivalence
class: instead of looking just immediate dominators, traverse all
dominators. This helps improving profile accuracy.

Bootstrapped and passed regression test.

OK for google-4_8 branch?

Thanks,
Dehao

Index: gcc/auto-profile.c
===================================================================
--- gcc/auto-profile.c (revision 203331)
+++ gcc/auto-profile.c (working copy)
@@ -891,7 +891,7 @@ afdo_find_equiv_class (void)
       if (bb->aux != NULL)
  continue;
       bb->aux = bb;
-      dom_bbs = get_dominated_by (CDI_DOMINATORS, bb);
+      dom_bbs = get_all_dominated_blocks (CDI_DOMINATORS, bb);
       FOR_EACH_VEC_ELT (dom_bbs, i, bb1)
  if (bb1->aux == NULL
     && dominated_by_p (CDI_POST_DOMINATORS, bb, bb1)
@@ -904,7 +904,7 @@ afdo_find_equiv_class (void)
  bb->flags |= BB_ANNOTATED;
       }
   }
-      dom_bbs = get_dominated_by (CDI_POST_DOMINATORS, bb);
+      dom_bbs = get_all_dominated_blocks (CDI_POST_DOMINATORS, bb);
       FOR_EACH_VEC_ELT (dom_bbs, i, bb1)
  if (bb1->aux == NULL
     && dominated_by_p (CDI_DOMINATORS, bb, bb1)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]