diff mbox

[GOOGLE] Use resolved node during AFDO vpt

Message ID CAAe5K+XTRLi=W-yzGFRwiKgshF6F-rfkiMBkinFEj7_qoUh1YQ@mail.gmail.com
State New
Headers show

Commit Message

Teresa Johnson July 23, 2014, 8:46 p.m. UTC
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.

Comments

Xinliang David Li July 23, 2014, 9:01 p.m. UTC | #1
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
diff mbox

Patch

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