diff options
author | Jan Hubicka <jh@suse.cz> | 2020-01-21 16:33:43 +0100 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2020-01-21 16:33:43 +0100 |
commit | 28307164dfed294855bf3d55bed357de560f083b (patch) | |
tree | 0c424dd708b166a638eb9e71247de2b0e667c586 /gcc/ipa.c | |
parent | 8158a4640819dbb3210326e37786fb874f450272 (diff) | |
download | gcc-28307164dfed294855bf3d55bed357de560f083b.zip gcc-28307164dfed294855bf3d55bed357de560f083b.tar.gz gcc-28307164dfed294855bf3d55bed357de560f083b.tar.bz2 |
Fix updating of call_stmt_site_hash
This patch fixes ICE causes by call stmt site hash going out of sync. For
speculative edges it is assumed to contain a direct call so if we are
removing it hashtable needs to be updated. I realize that the code is ugly
but I will leave cleanup for next stage1.
Bootstrapped/regtested x86_64-linux. This patch makes it possible to build
Firefox again.
PR lto/93318
* cgraph.c (cgraph_edge::resolve_speculation,
cgraph_edge::redirect_call_stmt_to_callee): Fix update of
call_stmt_site_hash.
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -391,17 +391,20 @@ symbol_table::remove_unreachable_nodes (FILE *file) n->used_as_abstract_origin = true; } } - /* If any symbol in a comdat group is reachable, force - all externally visible symbols in the same comdat + /* If any non-external and non-local symbol in a comdat group is + reachable, force all externally visible symbols in the same comdat group to be reachable as well. Comdat-local symbols can be discarded if all uses were inlined. */ - if (node->same_comdat_group) + if (node->same_comdat_group + && node->externally_visible + && !DECL_EXTERNAL (node->decl)) { symtab_node *next; for (next = node->same_comdat_group; next != node; next = next->same_comdat_group) if (!next->comdat_local_p () + && !DECL_EXTERNAL (next->decl) && !reachable.add (next)) enqueue_node (next, &first, &reachable); } |