aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/cgraph.c2
-rw-r--r--gcc/ipa.c12
-rw-r--r--gcc/trans-mem.c1
4 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fb90848..a40d4a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 6ab7891..a90e1a7 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -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;
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 2f60a98..aa6485c 100644
--- 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
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 6289ea4..5b07e71 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -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;