aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-02-11 10:11:06 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-02-11 09:11:06 +0000
commit4bd019b8d50600807d95aadeb451b2e68162745f (patch)
treeb7dae2a1fbb3c0a2609733cd211669c59ad0e68b /gcc/ipa.c
parent80f6181e2727fc2c2d74b603f94d44ae36daae66 (diff)
downloadgcc-4bd019b8d50600807d95aadeb451b2e68162745f.zip
gcc-4bd019b8d50600807d95aadeb451b2e68162745f.tar.gz
gcc-4bd019b8d50600807d95aadeb451b2e68162745f.tar.bz2
re PR ipa/65005 (FAIL: c-c++-common/torture/builtin-arith-overflow-12.c)
PR ipa/65005 * ipa-visibility.c (cgraph_node::non_local_p): Turn into static function. * symtab.c (symtab_node::verify_base): Remove check that non-definitions have no comdat group. * lto-cgraph.c (lto_output_node): Always output thunk and alias info. (lto_output_varpool_node): Always output alias info. (output_refs): Output refs of boundary aliases, too. (compute_ltrans_boundary): Add alias and thunk target into boundaries. (output_symtab): Output call eges in thunks in boundary. (get_alias_symbol): Remove. (input_node, input_varpool_node): Do not special case weakrefs. * ipa.c (symbol_table::remove_unreachable_nodes): Do not remove alias and thunks targets in the boundary; do not take removed symbols from their comdat groups. * cgraph.c (cgraph_node::local_info): Look through aliases and thunks. (cgraph_node::global_info): Remove. (cgraph_node::rtl_info): Look through aliases and thunks. * cgrpah.h (global_info): Remove. (non_local_p): Remove. From-SVN: r220608
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 9cbd2da..620431c 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -383,7 +383,11 @@ symbol_table::remove_unreachable_nodes (FILE *file)
/* If we are processing symbol in boundary, mark its AUX pointer for
possible later re-processing in enqueue_node. */
if (in_boundary_p)
- node->aux = (void *)2;
+ {
+ node->aux = (void *)2;
+ if (node->alias && node->analyzed)
+ enqueue_node (node->get_alias_target (), &first, &reachable);
+ }
else
{
if (TREE_CODE (node->decl) == FUNCTION_DECL
@@ -486,6 +490,9 @@ symbol_table::remove_unreachable_nodes (FILE *file)
}
}
+ else if (cnode->thunk.thunk_p)
+ enqueue_node (cnode->callees->callee, &first, &reachable);
+
/* If any reachable function has simd clones, mark them as
reachable as well. */
if (cnode->simd_clones)
@@ -534,7 +541,7 @@ symbol_table::remove_unreachable_nodes (FILE *file)
node->release_body ();
else if (!node->clone_of)
gcc_assert (in_lto_p || DECL_RESULT (node->decl));
- if (node->definition)
+ if (node->definition && !node->alias && !node->thunk.thunk_p)
{
if (file)
fprintf (file, " %s/%i", node->name (), node->order);
@@ -554,7 +561,6 @@ symbol_table::remove_unreachable_nodes (FILE *file)
if (!node->in_other_partition)
node->local.local = false;
node->remove_callees ();
- node->remove_from_same_comdat_group ();
node->remove_all_references ();
changed = true;
if (node->thunk.thunk_p
@@ -614,7 +620,7 @@ symbol_table::remove_unreachable_nodes (FILE *file)
vnode->remove ();
changed = true;
}
- else if (!reachable.contains (vnode))
+ else if (!reachable.contains (vnode) && !vnode->alias)
{
tree init;
if (vnode->definition)