On 05/08/14 02:07, Zhenqiang Chen wrote:
Hi,

The patch splits the live_edge for move_insn_for_shrink_wrap to sink
the copy out of the entry block.

Bootstrap and no make check regression on X86-64 and ARM.

OK for trunk?

Thanks!
-Zhenqiang

ChangeLog:
2014-05-08  Zhenqiang Chen  <zhenqiang.c...@linaro.org>

         * function.c (next_block_for_reg): Allow live_edge->dest has two
         predecessors.
         (move_insn_for_shrink_wrap): Split live_edge.
         (prepre_shrink_wrap): One more parameter for move_insn_for_shrink_wrap.


diff --git a/gcc/function.c b/gcc/function.c
index 764ac82..0be58e2 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5381,7 +5381,7 @@ requires_stack_frame_p (rtx insn, HARD_REG_SET
prologue_used,
     and if BB is its only predecessor.  Return that block if so,
     otherwise return null.  */

-static basic_block
+static edge
  next_block_for_reg (basic_block bb, int regno, int end_regno)
Comment for this function needs to be changed. You're no longer returning a block, but the edge leading to the block. It also seems the name of the function ought to change.

This looks basically OK. I'd like to see the requested cleanups made, then the resulting new patch reposted for a final review.

Jeff

Reply via email to