This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, 2/2] shrink wrap a function with a single loop: split live_edge
- From: Zhenqiang Chen <zhenqiang dot chen at linaro dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 9 May 2014 14:43:25 +0800
- Subject: Re: [PATCH, 2/2] shrink wrap a function with a single loop: split live_edge
- Authentication-results: sourceware.org; auth=none
- References: <CACgzC7AJUvPr_uQpMq7zS_570TKAqe12vp1T=D2s=7xUmmh6dA at mail dot gmail dot com> <536C70DA dot 1020504 at redhat dot com>
On 9 May 2014 14:08, Jeff Law <email@example.com> wrote:
> On 05/08/14 02:07, Zhenqiang Chen wrote:
>> 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?
>> 2014-05-08 Zhenqiang Chen <firstname.lastname@example.org>
>> * function.c (next_block_for_reg): Allow live_edge->dest has two
>> (move_insn_for_shrink_wrap): Split live_edge.
>> (prepre_shrink_wrap): One more parameter for
>> 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
>> 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.
Thank you for the comments. I will follow Steven's comments to
separate shrink-wrapping code from function.c to shrink-wrap.c.