On Tue, Sep 29, 2015 at 1:21 AM, Jeff Law <l...@redhat.com> wrote: > 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.ch...@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). Here is some more information. For spec2k6 on x86, no regression or obvious improvement. For spec2k6 on aarch64, several cases are improved. Given the results and your positive feedback, I will continue to work on this patch when I get back from holiday.
> > > 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. Hmm, either way we need to model rtx/register pressure costs, in loop invariant or cprop. Thanks, bin > > jeff