[PATCH, PR target/65103, 2/3] Propagate address constants into loops for i386

Ilya Enkovich enkovich.gnu@gmail.com
Thu Jun 25 14:15:00 GMT 2015


Ping

2015-06-01 15:26 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
> 2015-05-29 1:15 GMT+03:00 Jeff Law <law@redhat.com>:
>>
>> Right, but you're blindly propagating.  The right thing to do is look at
>> some kind of metric to estimate when it's profitable to propagate the
>> constant back in vs leave it hoisted out.
>
> No, the patch is not to blindly propagate but to let loop invariant to
> be propagated into address. Existing propagation gain estimation
> (should_replace_address) still applies.
>
> Thanks,
> Ilya
>
>>
>> If you look at what Kugan is doing in cprop.c, that's exactly the approach
>> he's taking -- looking at rtx costing to determine when to propagate the
>> constant back into the loop.  It could probably be made better with some
>> knowledge of register pressure and looking at whether or not all uses (vs
>> just some uses) of the constant will be propagated.
>>
>> Jeff



More information about the Gcc-patches mailing list