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]

Re: [GOOGLE] Use resolved node during AFDO vpt


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