This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enabling -frename-registers?
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "bschmidt at redhat dot com" <bschmidt at redhat dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, nd <nd at arm dot com>, Richard Biener <richard dot guenther at gmail dot com>, "dje dot gcc at gmail dot com" <dje dot gcc at gmail dot com>, "law at redhat dot com" <law at redhat dot com>, "segher at kernel dot crashing dot org" <segher at kernel dot crashing dot org>
- Date: Wed, 04 May 2016 21:06:36 +0200
- Subject: Re: Enabling -frename-registers?
- Authentication-results: sourceware.org; auth=none
- References: <AM3PR08MB00884B492D88A3EC1F636971837B0 at AM3PR08MB0088 dot eurprd08 dot prod dot outlook dot com>
> I do not see that working unfortunately - Thumb-2 codesize increases by a
> few percent even with -Os. This is primarily due to replacing a low
> register with IP, which often changes a 16-bit instruction like:
>
> movs r2, #8
>
> into a 32-bit one:
>
> mov ip, #8
>
> This will also affect other targets with multiple instruction sizes. So I
> think it should check the size of the new instruction patterns and only
> accept a rename if it is not larger (certainly with -Os).
I'd rather let the back-end do that, either through preferred_rename_class or
another hook.
--
Eric Botcazou