This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Cleanup the CFG after pro_and_epilogue pass
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 May 2013 21:49:55 +0200
- Subject: [patch] Cleanup the CFG after pro_and_epilogue pass
Hello,
Trying to dump the CFG as a graph fails after the pro_and_epilogue
pass because it leaves unreachable basic blocks. This patch fixes that
issue.
Will commit sometime next week if no-one objects.
Ciao!
Steven
* function.c (rest_of_handle_thread_prologue_and_epilogue):
Cleanup the CFG after thread_prologue_and_epilogue_insns.
Index: function.c
===================================================================
--- function.c (revision 199028)
+++ function.c (working copy)
@@ -6976,6 +6976,9 @@ rest_of_handle_thread_prologue_and_epilo
scheduling to operate in the epilogue. */
thread_prologue_and_epilogue_insns ();
+ /* The prologue and epilogue may have made some blocks unreachable. */
+ cleanup_cfg (0);
+
/* The stack usage info is finalized during prologue expansion. */
if (flag_stack_usage_info)
output_stack_usage ();