[Committed] [PATCH, 1/2] shrink wrap a function with a single loop: copy propagation

Zhenqiang Chen zhenqiang.chen@linaro.org
Thu May 15 06:58:00 GMT 2014


On 15 May 2014 02:07, Jeff Law <law@redhat.com> wrote:
> On 05/13/14 04:04, Zhenqiang Chen wrote:
>>
>> After reading the code in regcprop.c, I think I should reuse the
>> copyprop_hardreg_forward_1. So rewrite the patch, which is much simple
>> and should handle HAVE_cc0. But not sure we'd handle DEBUG_INSN or
>> not.
>>
>> 2014-05-13  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
>>
>>          * regcprop.c (skip_debug_insn_p): New decl.
>>          (replace_oldest_value_reg): Check skip_debug_insn_p.
>>          (copyprop_hardreg_forward_bb_without_debug_insn.): New function.
>>          * shrink-wrap.c (prepare_shrink_wrap):
>>          Call copyprop_hardreg_forward_bb_without_debug_insn.
>>          * function.h (copyprop_hardreg_forward_bb_without_debug_insn):
>>          New prototype.
>>
>> testsuite/ChangeLog:
>> 2014-05-13  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
>>
>>          * shrink-wrap-loop.c: New test case.
>
> Basically OK.
>
> Can you create regcprop.h and put the prototype for
> copyprop_hardreg_forward_bb_without_debug_insn in there?
>
> Then include regcprop.h in shrink-wrap.c.
>
> With that change, approved.  Please post the final version for archival
> purposes.

Thanks. Committed @r210458 with the suggested changes.

ChangeLog:
2014-05-15  Zhenqiang Chen  <zhenqiang.chen@linaro.org>

        * regcprop.h: New file.
        * regcprop.c (skip_debug_insn_p): New decl.
        (replace_oldest_value_reg): Check skip_debug_insn_p.
        (copyprop_hardreg_forward_bb_without_debug_insn.): New function.
        * shrink-wrap.c: include regcprop.h
        (prepare_shrink_wrap):
        Call copyprop_hardreg_forward_bb_without_debug_insn.

testsuite/ChangeLog:
2014-05-15  Zhenqiang Chen  <zhenqiang.chen@linaro.org>

        * shrink-wrap-loop.c: New test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shrink-wrap-copy-prop.patch
Type: text/x-patch
Size: 4144 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140515/71e3e288/attachment.bin>


More information about the Gcc-patches mailing list