]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ipa/63566 (i686 bootstrap fails: ICE RTL flag check: INSN_UID used with unexpec...
authorJan Hubicka <hubicka@ucw.cz>
Sun, 8 Feb 2015 21:08:44 +0000 (22:08 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 8 Feb 2015 21:08:44 +0000 (21:08 +0000)
PR ipa/63566
* ipa-visibility.c (cgraph_node::non_local_p): Accept aliases.
(cgraph_node::local_p): Remove thunk related FIXME.

From-SVN: r220521

gcc/ChangeLog
gcc/ipa-visibility.c

index 83019f916986e18d574f4f5c60314d246d852b5c..6815c20c6f60bfa9934275ea0ff3bc15cd8882ce 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-08  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/63566 
+       * ipa-visibility.c (cgraph_node::non_local_p): Accept aliases.
+       (cgraph_node::local_p): Remove thunk related FIXME.
+
 2015-02-08  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/63566 
index 71894afc90a94823ca466744648462c336ef2b5f..00b28e6e89c02c3572004266330b2885d3f1f2b4 100644 (file)
@@ -104,14 +104,15 @@ along with GCC; see the file COPYING3.  If not see
 bool
 cgraph_node::non_local_p (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
 {
-   /* FIXME: Aliases can be local, but i386 gets thunks wrong then.  */
-   return !(node->only_called_directly_or_aliased_p ()
-           && !node->has_aliases_p ()
-           && node->definition
-           && !DECL_EXTERNAL (node->decl)
-           && !node->externally_visible
-           && !node->used_from_other_partition
-           && !node->in_other_partition);
+  return !(node->only_called_directly_or_aliased_p ()
+          /* i386 would need update to output thunk with locak calling
+             ocnvetions.  */
+          && !node->thunk.thunk_p
+          && node->definition
+          && !DECL_EXTERNAL (node->decl)
+          && !node->externally_visible
+          && !node->used_from_other_partition
+          && !node->in_other_partition);
 }
 
 /* Return true when function can be marked local.  */
@@ -121,12 +122,10 @@ cgraph_node::local_p (void)
 {
    cgraph_node *n = ultimate_alias_target ();
 
-   /* FIXME: thunks can be considered local, but we need prevent i386
-      from attempting to change calling convention of them.  */
    if (n->thunk.thunk_p)
-     return false;
+     return n->callees->callee->local_p ();
    return !n->call_for_symbol_thunks_and_aliases (cgraph_node::non_local_p,
-                                               NULL, true);
+                                                 NULL, true);
                                        
 }