This is the mail archive of the
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: Tue, 13 May 2014 13:23:45 -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> <CACgzC7CDajr9nMioSvE65GQPQ0-YDrunE1oiRxUQn4cKRmAXUQ at mail dot gmail dot com>
On 05/09/14 01:30, Zhenqiang Chen wrote:
So why restrict this to just cases where we have to propagate into a COMPARE
at the end of a block? So in your example, assume the first block looks
prepare_shrink_wrap will move_insn_for_shrink_wrap in BB_INSNS_REVERSE
order. Current prepare_shrink_wrap should handle the case since there
is no data flow dependence.
Utilizing routines from the hard register copy propagation pass seems
wise. I'll take a look at the updated patch.
My first thought here was that we must have some code which does 90% of what
you need. Did you look at any of the existing RTL optimization
infrastructure to see if there was code you could extend to handle this?
Most the codes are from function copyprop_hardreg_forward_1 in
"cprop_hardreg" pass. Previously I had a patch to reuse it:
http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00305.html. What do you
think about the old patch?