[PATCH, ARM] Allow high regs when optimising for size on Thumb-2

Richard Earnshaw rearnsha@arm.com
Thu Apr 15 13:36:00 GMT 2010


On Thu, 2010-04-01 at 09:32 +0100, Julian Brown wrote:
> Hi,
> 
> This is a size optimisation for Thumb-2. With the patch applied, high
> registers are permitted when optimising for size for Thumb-2 (but
> still not for Thumb-1). Also SImode loads and stores have their
> constraints split into high/low register halves with the high parts not
> taken into account when choosing register preferences, to reflect the
> greater expense of the high-register alternatives (we don't want to
> influence the compiler to use them unless necessary).
> 
> Tested on mainline (with flags to generate Thumb-2 code). (We've
> also been carrying this in our internal trees for quite a while). OK to
> apply?
> 
> Julian
> 
> ChangeLog
> 
>        2007-07-05  Mark Shinwell  <shinwell@codesourcery.com>
> 
>         gcc/
>         * config/arm/thumb2.md (thumb2_movsi_insn): Split ldr and
>         str alternatives according to use of high and low regs.
>         * config/arm/vfp.md (thumb2_movsi_vfp): Likewise.
>         * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Use high
>         regs when optimizing for size on Thumb-2.

OK.

R.



More information about the Gcc-patches mailing list