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.
Hi Richard,
> > 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).
I understand your concern. Do you mean to create a macro just for the
parts of combine.c that I touched or something global? The only thing
I am afraid about adding a new macro is that it might be used half the
time when it should be used. REG_P is a good example. Some people
say "GET_CODE (X) == REG" while others say "REG_P (X)".
Kazu Hirata