This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]