This patch changes to no update callee count if caller count is not a
resolved node (in LIPO mode) during AutoFDO compilation. This is
because AutoFDO will have the same edge counts for all unresolved
nodes. Original update method will lead to multi-update of the callee.
Bootstrapped and testing on going.
OK for google-4_8 if test is OK?
Thanks,
Dehao
Index: gcc/ipa-inline-transform.c
===================================================================
--- gcc/ipa-inline-transform.c (revision 204131)
+++ gcc/ipa-inline-transform.c (working copy)
@@ -169,6 +169,15 @@ clone_inlined_nodes (struct cgraph_edge *e, bool d
else
{
struct cgraph_node *n;
+ if (flag_auto_profile && L_IPO_COMP_MODE
+ && cgraph_pre_profiling_inlining_done)
+ {
+ struct cgraph_node *caller = e->caller;
+ if (caller->global.inlined_to)
+ caller = caller->global.inlined_to;
+ if (cgraph_lipo_get_resolved_node (caller->symbol.decl) != caller)
+ update_original = false;
+ }
n = cgraph_clone_node (e->callee, e->callee->symbol.decl,
e->count, e->frequency,
update_original, vNULL, true);