On Wed, Dec 20, 2017 at 09:29:22AM +0100, Eric Botcazou wrote:
> > If some port maintainer used 1 <= x && x <= 24 style and doesn't like
> > x >= 1 && x <= 24 for some reason, there is always IN_RANGE macro and
> > IN_RANGE (x, 1, 24) can be used instead (though, such a change requires
> > double checking the type of x, it shouldn't be wider than HOST_WIDE_INT).
> 
> Yes, the visium changes are rather counter-productive, especially in 
> visium_legitimize_address & visium_legitimize_reload_address where the style 
> is clearly inconsistent now.
> 
> As far as I'm concerned, reading (a < x && x < b) is twice as fast as reading 
> (x > a && x < b).  And IN_RANGE is too ambiguous wrt the bounds.

That depends on the reader, and as we have multiple readers, it is better to
be consistent.  And, I find no ambiguity on IN_RANGE, it is
inclusive for both values and used heavily through the compiler, so using it
is a welcome cleanup, e.g. some ports that use it most often:
67 config/i386/
59 config/frv/
53 config/rs6000/
52 config/powerpcspe/
46 config/mips/
44 config/avr/
28 config/m68k/
23 config/rl78/
23 config/arm/
23 config/aarch64/
15 config/rx/
15 config/mn10300/
14 config/m32c/
14 config/h8300/
11 config/cris/
10 config/fr30/

        Jakub

Reply via email to