This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[GOOGLE] AutoFDO profile propagation should use all dominators
- From: Dehao Chen <dehao at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: David Li <davidxl at google dot com>
- Date: Wed, 9 Oct 2013 16:47:29 -0700
- Subject: [GOOGLE] AutoFDO profile propagation should use all dominators
- Authentication-results: sourceware.org; auth=none
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)