[patch] combine.c: Very tiny speedup.
Richard Earnshaw
rearnsha@arm.com
Sat Jun 28 13:57:00 GMT 2003
> 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.
More information about the Gcc-patches
mailing list