diff mbox

[GOOGLE] get resolved node in walk_polymorphic_call_targets

Message ID CAO2gOZUxersqEeEn+5PQOpSS+KzfXU-a8wVUtQ7K-y6oQ8a5AQ@mail.gmail.com
State New
Headers show

Commit Message

Dehao Chen May 23, 2014, 10:03 p.m. UTC
This patch fixes LIPO ICE that an unresolved node escaped after lipo fixup.

testing on going. OK for google-4_9?

Thanks,
Dehao

Comments

Xinliang David Li May 23, 2014, 10:11 p.m. UTC | #1
ok.

David

On Fri, May 23, 2014 at 3:03 PM, Dehao Chen <dehao@google.com> wrote:
> This patch fixes LIPO ICE that an unresolved node escaped after lipo fixup.
>
> testing on going. OK for google-4_9?
>
> Thanks,
> Dehao
>
> Index: gcc/ipa.c
> ===================================================================
> --- gcc/ipa.c (revision 210864)
> +++ gcc/ipa.c (working copy)
> @@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
>  #include "tree-inline.h"
>  #include "profile.h"
>  #include "params.h"
> +#include "l-ipo.h"
>
>  /* Return true when NODE can not be local. Worker for cgraph_local_node_p.  */
>
> @@ -195,6 +196,9 @@ walk_polymorphic_call_targets (pointer_set_t *reac
>   {
>     struct cgraph_node *n = targets[i];
>
> +   if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
> +     n = cgraph_lipo_get_resolved_node (n->decl);
> +
>     /* Do not bother to mark virtual methods in anonymous namespace;
>       either we will find use of virtual table defining it, or it is
>       unused.  */
diff mbox

Patch

Index: gcc/ipa.c
===================================================================
--- gcc/ipa.c (revision 210864)
+++ gcc/ipa.c (working copy)
@@ -39,6 +39,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "tree-inline.h"
 #include "profile.h"
 #include "params.h"
+#include "l-ipo.h"

 /* Return true when NODE can not be local. Worker for cgraph_local_node_p.  */

@@ -195,6 +196,9 @@  walk_polymorphic_call_targets (pointer_set_t *reac
  {
    struct cgraph_node *n = targets[i];

+   if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
+     n = cgraph_lipo_get_resolved_node (n->decl);
+
    /* Do not bother to mark virtual methods in anonymous namespace;
      either we will find use of virtual table defining it, or it is
      unused.  */