In the current implementation, update_all_callee_keys only invokes
update_caller_keys for one edge. For the AutoFDO case, it could cause
important edges not being updated because top-down inline pattern is
very popular in AutoFDO. This patch ensures all edges are updated in
update_caller_keys.

Bootstrapped and passed gcc regression tests.

Is it okay for google-4_7 branch?

Thanks,
Dehao

--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1234,7 +1234,8 @@ update_all_callee_keys (fibheap_t heap, struct
cgraph_node *node,
           Reset their caches  */
         reset_node_growth_cache (callee);
        if (e->inline_failed)
-         update_caller_keys (heap, callee, updated_nodes, e);
+         update_caller_keys (heap, callee, updated_nodes,
+                             flag_auto_profile ? NULL : e);
        if (e->next_callee)
          e = e->next_callee;
        else

Reply via email to