Message ID | e03b8b3273b84107c8b8d39ff6dc5130921d9710.1470015604.git.segher@kernel.crashing.org |
---|---|
State | New |
Headers | show |
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: > cfgcleanup would try to join noreturn paths with different components > handled. This then fails in dwarf2cfi. > > 2016-06-07 Segher Boessenkool <segher@kernel.crashing.org> > > * cfgcleanup.c (outgoing_edges_match): Don't join noreturn calls > if shrink_wrapped_separate. So if you only have fake edges, then you've got a non-returning call. If you could twiddle the comment to make that clear it'd be appreciated. Obviously you could look at the components and allow joining if the components are the same. But I don't know if that happens enough in practice to be worth the effort. OK with the comment update if/when the kit as a whole is approved. jeff
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 023b9d2..e3f205b 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1824,6 +1824,11 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) || !find_reg_note (last1, REG_ARGS_SIZE, NULL))) return false; + /* If shrink-wrapping separate components, joining noreturn calls that + have different components set up will confuse dwarf2cfi. */ + if (!nonfakeedges && crtl->shrink_wrapped_separate) + return false; + /* fallthru edges must be forwarded to the same destination. */ if (fallthru1) {