diff options
author | Jan Hubicka <jh@suse.cz> | 2013-05-08 14:59:21 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-05-08 12:59:21 +0000 |
commit | 702d87032825f284efe6a5287c478692e103318c (patch) | |
tree | 4de5ffd28741a97813d02261d3fc8eed70c982ba /gcc/ipa.c | |
parent | 8b28cf47bf7f071c979cb13694e45757081ee9d7 (diff) | |
download | gcc-702d87032825f284efe6a5287c478692e103318c.zip gcc-702d87032825f284efe6a5287c478692e103318c.tar.gz gcc-702d87032825f284efe6a5287c478692e103318c.tar.bz2 |
re PR lto/54095 (Unnecessary static variable renaming)
PR lto/54095
* cgraph.c (cgraph_make_node_local_1): Se unique_name.
* cgraph.h (symtab_node_base): Add unique_name.
* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
input_overwrite_node, input_varpool_node): Stream unique_name.
* cgraphclones.c (cgraph_create_virtual_clone,
cgraph_function_versioning): Set unique_name.
* ipa.c (function_and_variable_visibility): Set unique_name.
From-SVN: r198710
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -786,6 +786,9 @@ function_and_variable_visibility (bool whole_program) { gcc_assert (whole_program || in_lto_p || !TREE_PUBLIC (node->symbol.decl)); + node->symbol.unique_name = ((node->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY + || node->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP) + && TREE_PUBLIC (node->symbol.decl)); symtab_make_decl_local (node->symbol.decl); node->symbol.resolution = LDPR_PREVAILING_DEF_IRONLY; if (node->symbol.same_comdat_group) @@ -861,6 +864,9 @@ function_and_variable_visibility (bool whole_program) { gcc_assert (in_lto_p || whole_program || !TREE_PUBLIC (vnode->symbol.decl)); symtab_make_decl_local (vnode->symbol.decl); + vnode->symbol.unique_name = ((vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY + || vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP) + && TREE_PUBLIC (vnode->symbol.decl)); if (vnode->symbol.same_comdat_group) symtab_dissolve_same_comdat_group_list ((symtab_node) vnode); vnode->symbol.resolution = LDPR_PREVAILING_DEF_IRONLY; |