aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-08-20 15:55:06 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-08-20 13:55:06 +0000
commit8605403e2bcb731d5f1c8579a9c2ea3436e2fb27 (patch)
treed02afd479c74875a28f01dba8b1c20718de3c062 /gcc/cgraphunit.c
parent3ba421e8becbd17526a88ec76226d7213b96af14 (diff)
downloadgcc-8605403e2bcb731d5f1c8579a9c2ea3436e2fb27.zip
gcc-8605403e2bcb731d5f1c8579a9c2ea3436e2fb27.tar.gz
gcc-8605403e2bcb731d5f1c8579a9c2ea3436e2fb27.tar.bz2
cgraphunit.c (ipa_passes, compile): Reshedule symtab_remove_unreachable_nodes passes; update comments.
* cgraphunit.c (ipa_passes, compile): Reshedule symtab_remove_unreachable_nodes passes; update comments. * ipa-inline.c (pass_data_ipa_inline): Do not schedule TODO_remove_functions before the pass; the functions ought to be already removed. * ipa.c (pass_data_ipa_free_inline_summary): Enable dump; schedule TODO_remove_functions. * passes.c (pass_data_early_local_passes): Do not schedule function removal. (execute_one_pass): Fix call of symtab_remove_unreachable_nodes. * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes call. (do_whole_program_analysis): Only sanity check that IPA passes cleans up. * testsuite/g++.dg/ipa/devirt-17.C: Update template. * testsuite/g++.dg/ipa/devirt-16.C: Update template. From-SVN: r214224
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 2c2006b..20294b3 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2047,10 +2047,8 @@ ipa_passes (void)
return;
}
- /* We never run removal of unreachable nodes after early passes. This is
- because TODO is run before the subpasses. It is important to remove
- the unreachable functions to save works at IPA level and to get LTO
- symbol tables right. */
+ /* This extra symtab_remove_unreachable_nodes pass tends to catch some
+ devirtualization and other changes where removal iterate. */
symtab_remove_unreachable_nodes (true, cgraph_dump_file);
/* If pass_all_early_optimizations was not scheduled, the state of
@@ -2184,7 +2182,8 @@ compile (void)
}
/* This pass remove bodies of extern inline functions we never inlined.
- Do this later so other IPA passes see what is really going on. */
+ Do this later so other IPA passes see what is really going on.
+ FIXME: This should be run just after inlining by pasmanager. */
symtab_remove_unreachable_nodes (false, dump_file);
cgraph_global_info_ready = true;
if (cgraph_dump_file)
@@ -2210,9 +2209,10 @@ compile (void)
cgraph_materialize_all_clones ();
bitmap_obstack_initialize (NULL);
execute_ipa_pass_list (g->get_passes ()->all_late_ipa_passes);
- symtab_remove_unreachable_nodes (true, dump_file);
#ifdef ENABLE_CHECKING
symtab_node::verify_symtab_nodes ();
+ /* Verify late IPA passes cleaned up after themselves. */
+ gcc_assert (!symtab_remove_unreachable_nodes (false, dump_file));
#endif
bitmap_obstack_release (NULL);
mark_functions_to_output ();