[Google] Update all caller edges for AutoFDO invocations

Message ID CAO2gOZVNR9VDE1O-60kjxdb3nB7O7SzpkGzjpQ0KeBXDCRe5aQ@mail.gmail.com
State New
Headers show

Commit Message

Dehao Chen April 8, 2013, 3:13 a.m.
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

Bootstrapped and passed gcc regression tests.

Is it okay for google-4_7 branch?




--- 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;