[PATCH] Make rtl_split_edge work for jumps that fall through (PR72749)

Jeff Law law@redhat.com
Sun Jan 15 05:53:00 GMT 2017


On 01/14/2017 10:27 PM, Segher Boessenkool wrote:
> On Sat, Jan 14, 2017 at 09:47:41PM -0700, Jeff Law wrote:
>>> 	PR target/72749
>>> 	* cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
>>> 	fallthrough.
>>> 	* haifa-sched.c (dump_insn_stream): Don't crash if there is a label
>>> 	in the currently scheduled RTL fragment.
>> So presumably the semantics in this case can only mean one thing -- both
>> the fallthru and the jump have to go to the same place after splitting.
>> Right?  ISTM that ought to be documented in rtl_split_edge somewhere.
>
> We could call patch_jump_insn in *all* cases, except for simple jumps
> it does
>
> 	  gcc_assert (JUMP_LABEL (insn) == old_label);
>
> which is a useful check (for the other callers), and patch_jump_insn
> isn't a very cheap routine to call anyway, better not do it too often.
>
>> In this case is the edge a fallthru or branch edge?
>
> Both!  You get only one edge if both jump targets are the same.
Right.  To be more precise, my question was does it  have EDGE_FALLTHRU 
set?

Jeff




More information about the Gcc-patches mailing list