On 27 October 2010 21:21, Jeff Law <l...@redhat.com> wrote:
>  On 10/27/10 12:15, Frederic Riss wrote:
>> On 26 October 2010 16:22, Jeff Law<l...@redhat.com>  wrote:
>>
>> The thing is the cprop pass doesn't look at insn costs while doing its
>> job AFAICS. I'm interested to see how insn splitting can help with
>> this if you don't care to explain.
>
> Certainly the SSA propagators don't use costing information; CSE on the
> other hand does using costing info, but not always in the way you might
> think (addresses in memory references for example are often backwards from
> what you might think)

Care to extend on that use of the costing info? I followed the code
path in gcse.c and e.g. do_local_cprop doesn't seem to care about
costs. BTW, I'm on the 4.5 branch if that matters.

> This is a common problem.  For constants, its generally preferable to first
> load them into registers and allow CSE to try and commonize the large
> constants.  Combine then will propagate single use constants into their use,
> leaving the multi-use constants commonized.

That's the situation I managed to get by preventing cprop to propagate
large constants. Once propagated, no CSE pass will extract and
commonize them again.

> Register pressure isn't as much of a problem as you might think because
> constants are relatively easy to rematerialize when there is excess register
> pressure.

That's what I thought, but I have yet to see GCC split the liveness of
the commonized constants. When should that be done?

Many thanks,
Fred

Reply via email to