[patch, CSE] Bit-field insertion optimization

Andrew Stubbs ams@codesourcery.com
Fri Dec 10 09:53:00 GMT 2010


On 09/12/10 17:47, Paolo Bonzini wrote:
> On 12/09/2010 05:45 PM, Andrew Stubbs wrote:
>> The first problem is that CSE cannot determine that the result is
>> constant because the auto-variable is implicitly initialized. I have
>> solved this by moving up the init-regs pass to before cse2. It might be
>> better to move it before cse1, but that's a bigger change, so I wasn't
>> sure?
>
> I think that would be fine independent of this change.
>
>> The second problem is that the pattern match for ZERO_EXTRACT requires
>> that the operand is an immediate constant, which is never the case on
>> ARM (and presumably is only the case with a limited range of inputs even
>> on other targets). I have added code to detect known-constant input
>> registers.
>
> Since I can choose, I prefer Chung-Lin's patch. :)

So, FAOD, you think the init-regs pass should be moved, but the 
ZERO_EXTRACT code should be dropped in favour of the other patch?

Should the init-regs be moved before cse1 or cse2?

I'm happy to resubmit such a patch, but would it be applicable now, or 
would I have to wait for stage one?

Andrew



More information about the Gcc-patches mailing list