This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] shrink-wrap: Fix up partitions (PR67587)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Tue, 15 Sep 2015 17:17:58 -0700
- Subject: [PATCH] shrink-wrap: Fix up partitions (PR67587)
- Authentication-results: sourceware.org; auth=none
With the new shrink-wrap algorithm, blocks reachable both with and
without prologue are duplicated, and their incoming edges are then
distributed accordingly. So we need to call fixup_partitions.
Is this okay for trunk?
Segher
2015-09-16 Segher Boessenkool <segher@kernel.crashing.org>
PR bootstrap/67587
* function.c (rest_of_handle_thread_prologue_and_epilogue): Call
fixup_partitions.
---
gcc/function.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/function.c b/gcc/function.c
index 5ff298a..1ff2ee8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6677,6 +6677,10 @@ rest_of_handle_thread_prologue_and_epilogue (void)
scheduling to operate in the epilogue. */
thread_prologue_and_epilogue_insns ();
+ /* Some non-cold blocks may now be only reachable from cold blocks.
+ Fix that up. */
+ fixup_partitions ();
+
/* Shrink-wrapping can result in unreachable edges in the epilogue,
see PR57320. */
cleanup_cfg (0);
--
1.8.1.4