This is the mail archive of the
mailing list for the GCC project.
Re: ARM patch: Reduce code duplication for Thumb2 move patterns
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 31 Jul 2010 14:16:38 +0100
- Subject: Re: ARM patch: Reduce code duplication for Thumb2 move patterns
- References: <4C3516E6.firstname.lastname@example.org>
On Thu, 2010-07-08 at 01:08 +0100, Bernd Schmidt wrote:
> There are many patterns in thumb2.md which are duplicated with only
> minor changes from their ARM equivalents. This patch removes some of
> this duplication.
> There's one functional change: the ARM movdi pattern disallows the
> mem->mem move case while the Thumb2 one does not; I assumed that the
> version was more desirable.
> Tested with my usual arm-linux/qemu setup. Ok? More patches of this
> kind coming if this is considered a good idea.
This is OK.
We need to watch out, when merging patterns in this way that we don't
increase the length calculations too much (ideally not at all). It's
safe, but in the long run is likely to lead to sub-optimal branch and
literal pool generation.