This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, 1/2] shrink wrap a function with a single loop: copy propagation
- From: Jeff Law <law at redhat dot com>
- To: Zhenqiang Chen <zhenqiang dot chen at linaro dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 May 2014 12:07:31 -0600
- Subject: Re: [PATCH, 1/2] shrink wrap a function with a single loop: copy propagation
- Authentication-results: sourceware.org; auth=none
- References: <CACgzC7C5gtZKnuLoVc53NFOEbNa81e-Mh75BrEOq-DdyVNfr3A at mail dot gmail dot com> <536C6EF1 dot 6080702 at redhat dot com> <CACgzC7AJbPshei4=OmoTBRc7fnSVcxTXMiD4+36bvhm=2GLtFA at mail dot gmail dot com>
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.
jeff