Message ID | CAAe5K+XTRLi=W-yzGFRwiKgshF6F-rfkiMBkinFEj7_qoUh1YQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
ok. David On Wed, Jul 23, 2014 at 1:46 PM, Teresa Johnson <tejohnson@google.com> wrote: > AFDO invokes cgraph_node_for_asm during VPT to get the cgraph node for > a callee. Use the resolved node so we don't add a reference to the > un-resolved node after LIPO fixup. > > Passes regression tests and internal test. Ok for google/4_9? > > Thanks, > Teresa > > 2014-07-23 Teresa Johnson <tejohnson@google.com> > > Google ref b/16190119 > * cgraph.c (cgraph_node_for_asm): Return resolved node. > > Index: cgraph.c > =================================================================== > --- cgraph.c (revision 212916) > +++ cgraph.c (working copy) > @@ -677,7 +677,11 @@ cgraph_node_for_asm (tree asmname) > { > cgraph_node *cn = dyn_cast <cgraph_node> (node); > if (cn && !cn->global.inlined_to) > - return cn; > + { > + if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done) > + return cgraph_lipo_get_resolved_node (cn->decl); > + return cn; > + } > } > return NULL; > } > > > -- > Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
Index: cgraph.c =================================================================== --- cgraph.c (revision 212916) +++ cgraph.c (working copy) @@ -677,7 +677,11 @@ cgraph_node_for_asm (tree asmname) { cgraph_node *cn = dyn_cast <cgraph_node> (node); if (cn && !cn->global.inlined_to) - return cn; + { + if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done) + return cgraph_lipo_get_resolved_node (cn->decl); + return cn; + } } return NULL; }