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: [47/77] Make subroutines of nonzero_bits operate on scalar_int_mode


On 07/13/2017 02:55 AM, Richard Sandiford wrote:
> nonzero_bits1 assumed that all bits of a floating-point or vector mode
> were needed.  It seems likely that fixed-point modes should have been
> handled in the same way.  After excluding those, the only remaining
> modes that are likely to be useful are scalar integer ones.
> 
> This patch moves the mode class check to nonzero_bits itself, along
> with the handling of mode == VOIDmode.  The subroutines of nonzero_bits
> can then take scalar_int_modes.
> 
> gcc/
> 2017-07-13  Richard Sandiford  <richard.sandiford@linaro.org>
> 	    Alan Hayward  <alan.hayward@arm.com>
> 	    David Sherwood  <david.sherwood@arm.com>
> 
> 	* rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
> 	in subroutines.  Return the mode mask for non-integer modes.
> 	(cached_nonzero_bits): Change the type of the mode parameter
> 	to scalar_int_mode.
> 	(nonzero_bits1): Likewise.  Remove early exit for other mode
> 	classes.  Handle CONST_INT_P first and then check whether X
> 	also has a scalar integer mode.
OK.  I suspect not handling fixed-point modes like floating point modes
was just an oversight.

jeff


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