This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ARM] Avoid using VFP registers for SImode
- From: Daniel Jacobowitz <drow at false dot org>
- To: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 5 Jan 2005 10:01:18 -0500
- Subject: Re: [PATCH, ARM] Avoid using VFP registers for SImode
- References: <1104924654.32077.103.camel@pc960.cambridge.arm.com>
On Wed, Jan 05, 2005 at 11:30:54AM +0000, Richard Earnshaw wrote:
> Not sure if this really counts as a bug, but VFP support is new in
> gcc-4, so this can't introduce a regression.
>
> On ARM processors with VFP floating point, using the VFP registers for
> integer values (except when we are about to convert them into floating
> point values) is a bad idea. However, GCC is far too keen to try this
> when register pressure starts to increase. This patch fixes this by
> hiding the VFP register classes from the register preferencing pass.
>
> Tested on arm-elf with VFP enabled.
Ah, that's a fix I hadn't thought of...
I noticed a similar case at -O0 last week. The reason in my testcase that
regclass is so eager to try this is here:
enum reg_class
{
NO_REGS,
FPA_REGS,
CIRRUS_REGS,
VFP_REGS,
...
At -O0 regclass uses the cheapest class for "best" and the first class
it sees that is better than memory for "alt", so "alt" is almost always
VFP_REGS. Maybe the costs need adjustment if memry should be preferred
to VFP_REGS.
--
Daniel Jacobowitz