Patchwork [Google] Update all caller edges for AutoFDO invocations

login
register
mail settings
Submitter Dehao Chen
Date April 8, 2013, 3:13 a.m.
Message ID <CAO2gOZVNR9VDE1O-60kjxdb3nB7O7SzpkGzjpQ0KeBXDCRe5aQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/234561/
State New
Headers show

Comments

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
update_caller_keys.

Bootstrapped and passed gcc regression tests.

Is it okay for google-4_7 branch?

Thanks,
Dehao

        else

Patch

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