This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] combine.c: Very tiny speedup.


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]