aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-01-06 14:08:02 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-01-06 14:08:02 +0000
commit5406184ce77c6362c5cd513b1c4f1c05b5046a6d (patch)
tree7ffc886faaf8fc162eeb29ac08201c5906779b68 /gcc/lto
parent24d3f3251c2c35c086e6614da281c8c4524afa27 (diff)
downloadgcc-5406184ce77c6362c5cd513b1c4f1c05b5046a6d.zip
gcc-5406184ce77c6362c5cd513b1c4f1c05b5046a6d.tar.gz
gcc-5406184ce77c6362c5cd513b1c4f1c05b5046a6d.tar.bz2
lto-partition.c (promote_symbol): Write to dump file sooner, include alias promoting too.
* lto-partition.c (promote_symbol): Write to dump file sooner, include alias promoting too. From-SVN: r244159
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog3
-rw-r--r--gcc/lto/lto-partition.c16
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index dd94363..d099374 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,5 +1,8 @@
2017-01-06 Nathan Sidwell <nathan@acm.org>
+ * lto-partition.c (promote_symbol): Write to dump file sooner,
+ include alias promoting too.
+
* lto-partition.c (lto_balanced_map): Reformat/respell comment.
(may_need_named_section_p): Likewise.
(rename_statics): Likewise.
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index a0c0a2f..e27d0d16 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -987,11 +987,15 @@ promote_symbol (symtab_node *node)
TREE_PUBLIC (node->decl) = 1;
DECL_VISIBILITY (node->decl) = VISIBILITY_HIDDEN;
DECL_VISIBILITY_SPECIFIED (node->decl) = true;
- ipa_ref *ref;
+ if (symtab->dump_file)
+ fprintf (symtab->dump_file,
+ "Promoting as hidden: %s (%s)\n", node->name (),
+ IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl)));
- /* Promoting a symbol also promotes all trasparent aliases with exception
+ /* Promoting a symbol also promotes all transparent aliases with exception
of weakref where the visibility flags are always wrong and set to
!PUBLIC. */
+ ipa_ref *ref;
for (unsigned i = 0; node->iterate_direct_aliases (i, ref); i++)
{
struct symtab_node *alias = ref->referring;
@@ -1000,13 +1004,13 @@ promote_symbol (symtab_node *node)
TREE_PUBLIC (alias->decl) = 1;
DECL_VISIBILITY (alias->decl) = VISIBILITY_HIDDEN;
DECL_VISIBILITY_SPECIFIED (alias->decl) = true;
+ if (symtab->dump_file)
+ fprintf (symtab->dump_file,
+ "Promoting alias as hidden: %s\n",
+ IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl)));
}
gcc_assert (!alias->weakref || TREE_PUBLIC (alias->decl));
}
-
- if (symtab->dump_file)
- fprintf (symtab->dump_file,
- "Promoting as hidden: %s\n", node->name ());
}
/* Return true if NODE needs named section even if it won't land in