This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Question about comment in arm_legitimize_address()
- From: "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>
- To: "Ian Lance Taylor" <ian at wasabisystems dot com>, <rearnshaw at arm dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 20 Oct 2004 07:29:33 +0100
- Subject: RE: Question about comment in arm_legitimize_address()
> -----Original Message-----
> From: Ian Lance Taylor [mailto:ian@wasabisystems.com]
> Sent: 19 October 2004 19:43
> To: rearnshaw@arm.com
> Cc: gcc@gcc.gnu.org
> Subject: Question about comment in arm_legitimize_address()
>
> In the function thumb_legitimize_address() I see this:
>
> /* Try and fold the offset into a biasing of the base
> register and
> then offsetting that. Don't do this when optimizing for space
> since it can cause too many CSEs. */
> if (optimize_size && offset >= 0
> && offset < 256 + 31 * GET_MODE_SIZE (mode))
>
> The comment says don't do it when optimizing for space. The code says
> to do it only when optimizing for space. You added the function here:
> http://gcc.gnu.org/ml/gcc-patches/2004-02/msg02380.html
>
> Which is correct? The comment or the code?
>
> Ian
>
I think the comment is probably correct, but the code shouldn't be
changed without first validating it with something like the CSiBE
benchmark.
R.