This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove unreachable nodes before IPA profile pass (PR ipa/87706).
- From: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <hubicka at ucw dot cz>
- Date: Thu, 8 Nov 2018 09:24:38 +0100
- Subject: [PATCH] Remove unreachable nodes before IPA profile pass (PR ipa/87706).
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 <mliska@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 */
};