[PATCH] Fix up begin_move_insn (PR rtl-optimization/48721)

Vladimir Makarov vmakarov@redhat.com
Wed Nov 30 19:19:00 GMT 2011


On 11/30/2011 12:43 PM, Jakub Jelinek wrote:
> Hi!
>
> When INSN is followed by BARRIER, we should add the new dummy basic
> block after the barrier, not before it.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2011-11-30  Jakub Jelinek<jakub@redhat.com>
>
> 	PR rtl-optimization/48721
> 	* sched-ebb.c (begin_move_insn): Insert empty unreachable
> 	block after BARRIER if insn is followed by it.
>
> --- gcc/sched-ebb.c.jj	2011-10-24 12:21:14.000000000 +0200
> +++ gcc/sched-ebb.c	2011-11-30 13:40:27.450104193 +0100
> @@ -191,8 +191,13 @@ begin_move_insn (rtx insn, rtx last)
>   	  gcc_assert (NOTE_INSN_BASIC_BLOCK_P (BB_END (bb)));
>   	}
>         else
> -	/* Create an empty unreachable block after the INSN.  */
> -	bb = create_basic_block (NEXT_INSN (insn), NULL_RTX, last_bb);
> +	{
> +	  /* Create an empty unreachable block after the INSN.  */
> +	  rtx next = NEXT_INSN (insn);
> +	  if (next&&  BARRIER_P (next))
> +	    next = NEXT_INSN (next);
> +	  bb = create_basic_block (next, NULL_RTX, last_bb);
> +	}
>
>         /* split_edge () creates BB before E->DEST.  Keep in mind, that
>   	 this operation extends scheduling region till the end of BB.
>
> 	Jakub
Ok.  Thanks for working on this, Jakub.



More information about the Gcc-patches mailing list