re PR lto/57602 (Runfails for several C/C++ benchmarks from spec2000 for i686 with...
authorJan Hubicka <jh@suse.cz>
Mon, 5 Aug 2013 14:51:37 +0000 (16:51 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 5 Aug 2013 14:51:37 +0000 (14:51 +0000)
PR lto/57602
* cgraph.c (verify_cgraph_node): Accept local flags from other partitions.
* ipa.c (symtab_remove_unreachable_nodes): Do not clear local flag.
(function_and_variable_visibility): Likewise.
* trans-mem.c (ipa_tm_create_version): TM versions are not local.

From-SVN: r201492

gcc/ChangeLog
gcc/cgraph.c
gcc/ipa.c
gcc/trans-mem.c

index fb90848..a40d4a0 100644 (file)
@@ -1,3 +1,11 @@
+2013-08-05  Jan Hubicka  <jh@suse.cz>
+
+       PR lto/57602
+       * cgraph.c (verify_cgraph_node): Accept local flags from other partitions.
+       * ipa.c (symtab_remove_unreachable_nodes): Do not clear local flag.
+       (function_and_variable_visibility): Likewise.
+       * trans-mem.c (ipa_tm_create_version): TM versions are not local.
+
 2013-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        * graph.c (init_graph_slim_pretty_print): Remove.
index 6ab7891..a90e1a7 100644 (file)
@@ -2363,7 +2363,7 @@ verify_cgraph_node (struct cgraph_node *node)
       error ("inline clone in same comdat group list");
       error_found = true;
     }
-  if (!node->symbol.definition && node->local.local)
+  if (!node->symbol.definition && !node->symbol.in_other_partition && node->local.local)
     {
       error ("local symbols must be defined");
       error_found = true;
index 2f60a98..aa6485c 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -376,7 +376,15 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
            {
              if (file)
                fprintf (file, " %s", cgraph_node_name (node));
-             cgraph_reset_node (node);
+             node->symbol.analyzed = false;
+             node->symbol.definition = false;
+             node->symbol.cpp_implicit_alias = false;
+             node->symbol.alias = false;
+             node->symbol.weakref = false;
+             if (!node->symbol.in_other_partition)
+               node->local.local = false;
+             cgraph_node_remove_callees (node);
+             ipa_remove_all_references (&node->symbol.ref_list);
              changed = true;
            }
        }
@@ -888,7 +896,7 @@ function_and_variable_visibility (bool whole_program)
     }
   FOR_EACH_DEFINED_FUNCTION (node)
     {
-      node->local.local = cgraph_local_node_p (node);
+      node->local.local |= cgraph_local_node_p (node);
 
       /* If we know that function can not be overwritten by a different semantics
         and moreover its section can not be discarded, replace all direct calls
index 6289ea4..5b07e71 100644 (file)
@@ -4774,6 +4774,7 @@ ipa_tm_create_version (struct cgraph_node *old_node)
     DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
 
   new_node = cgraph_copy_node_for_versioning (old_node, new_decl, vNULL, NULL);
+  new_node->local.local = false;
   new_node->symbol.externally_visible = old_node->symbol.externally_visible;
   new_node->lowered = true;
   new_node->tm_clone = 1;