This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOOGLE] Use resolved node during AFDO vpt


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]