Message ID | d655b4744cbeed79588177af69f385b2d867cf10.1442362480.git.segher@kernel.crashing.org |
---|---|
State | New |
Headers | show |
On 09/16/2015 02:17 AM, Segher Boessenkool wrote: > 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? I think so, given that pass_duplicate_computed_gotos uses the same method. Bernd
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);