This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] combine.c: Very tiny speedup.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Sat, 28 Jun 2003 14:39:19 +0100
- Subject: Re: [patch] combine.c: Very tiny speedup.
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi,
>
> Attached is a patch to speed up force_to_mode() and
> simplify_comparison().
>
> Since the second hunk is surrounded by
>
> #ifndef WORD_REGISTER_OPERATIONS
>
> I tested on h8300 port, which does not define
> WORD_REGISTER_OPERATIONS. Committed as pre-approved by Zack.
>
> Kazu Hirata
>
> 2003-06-27 Kazu Hirata <kazu@cs.umass.edu>
>
> * combine.c (force_to_mode): Replace the equality comparison
> of INTVALs with a pointer equality comparison.
> (simplify_comparison): Likewise.
While there is nothing technically wrong with this, I don't like the fact
that it slightly obscures the test. Adding a macro to compare constants
might be a good idea (and also, with enable-checking that could be made to
assert that at least one of them was a constant).
R.