Hi.

In order to fix the warnings mentioned in the PR, we need
to run remove_unreachable_nodes after early tree passes. That's
however possible only within a IPA pass. Thus I'm calling that
before the profile PASS.

Patch survives regression tests on ppc64le-linux-gnu and majority
of warnings are gone in profiledbootstrap.

Ready for trunk?
Thanks,
Martin

gcc/ChangeLog:

2018-11-08  Martin Liska  <mli...@suse.cz>

        * tree-profile.c: Run TODO_remove_functions before "profile"
        pass in order to remove dead functions that will trigger
        -Wmissing-profile.
---
 gcc/tree-profile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index d8f2a3b1ba4..c14ebc556a6 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -776,7 +776,7 @@ const pass_data pass_data_ipa_tree_profile =
   0, /* properties_required */
   0, /* properties_provided */
   0, /* properties_destroyed */
-  0, /* todo_flags_start */
+  TODO_remove_functions, /* todo_flags_start */
   TODO_dump_symtab, /* todo_flags_finish */
 };
 

Reply via email to