Message ID | CACgzC7BJCot4jY=TrfP9NzHh7SLq2g_bNeZaXSTkzwMnesaXRg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 05/13/14 03:49, Zhenqiang Chen wrote: > On 9 May 2014 14:08, Jeff Law <law@redhat.com> wrote: >> 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.chen@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. OK. jeff
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index b302777..f11e920 100644 --- a/gcc/shrink-wrap.c +++ b/gcc/shrink-wrap.c @@ -1,4 +1,4 @@ -/* Expands front end tree to back end RTL for GCC. +/* Shrink-wrapping related optimizations. Copyright (C) 1987-2014 Free Software Foundation, Inc. This file is part of GCC. @@ -110,12 +110,12 @@ requires_stack_frame_p (rtx insn, HARD_REG_SET prologue_used, return false; } -/* See whether BB has a single successor that uses [REGNO, END_REGNO), - and if BB is its only predecessor. Return that block if so, - otherwise return null. */ +/* See whether there has a single live edge from BB, which dest uses + [REGNO, END_REGNO). Return the live edge if its dest bb has + one or two predecessors. Otherwise return NULL. */ -static basic_block -next_block_for_reg (basic_block bb, int regno, int end_regno) +static edge +live_edge_for_reg (basic_block bb, int regno, int end_regno) { edge e, live_edge;