This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC]Improve rtl loop inv cost by checking if the inv can be propagated to address uses
- From: Jeff Law <law at redhat dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>, Bin Cheng <bin dot cheng at arm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 28 Sep 2015 11:21:47 -0600
- Subject: Re: [PATCH GCC]Improve rtl loop inv cost by checking if the inv can be propagated to address uses
- Authentication-results: sourceware.org; auth=none
- References: <000001d0f9d2$1254f370$36feda50$ at arm dot com> <56092466 dot 30100 at redhat dot com>
On 09/28/2015 05:28 AM, Bernd Schmidt wrote:
On 09/28/2015 11:43 AM, Bin Cheng wrote:
Bootstrap and test on x86_64 and x86_32. Will test it on aarch64. So
any
comments?
Thanks,
bin
2015-09-28 Bin Cheng <bin.cheng@arm.com>
* loop-invariant.c (struct def): New field cant_fwprop_to_addr_uses.
(inv_cant_fwprop_to_addr_use): New function.
(record_use): Call inv_cant_fwprop_to_addr_use, set the new field.
(get_inv_cost): Count cost if inv can't be propagated into its
address uses.
It looks at least plausible.
Definitely plausible. Many targets have restrictions on the immediate
offsets, so this potentially affects many targets (in a good way).
Another option which I think has had some
discussion recently would be to just move everything, and leave it to
cprop to put things back together if the costs allow it.
I go back and forth on this kind of approach.
jeff