[49/77] Simplify nonzero/num_sign_bits hooks
commit652e50b4a3a30e63aaa8c4cbce80e8249df4ad24
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:17:12 +0000 (30 11:17 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:17:12 +0000 (30 11:17 +0000)
tree6f33c3a098eadeec40ab3a1d2b8e5a10578f856d
parent2ed966b85ea94758cca8e88534697f3357f00650
[49/77] Simplify nonzero/num_sign_bits hooks

The two implementations of the reg_nonzero_bits and reg_num_sign_bits
hooks ignored the "known_x", "known_mode" and "known_ret" arguments,
so this patch removes them.  It adds a new scalar_int_mode parameter
that specifies the mode of "x".  (This mode might be different from
"mode", which is the mode in which "x" is used.)

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
parameter for the mode of "x".  Remove the "known_x", "known_mode"
and "known_ret" arguments.  Change the type of the mode argument
to scalar_int_mode.
(rtl_hooks:reg_num_sign_bit_copies): Likewise.
* combine.c (reg_nonzero_bits_for_combine): Update accordingly.
(reg_num_sign_bit_copies_for_combine): Likewise.
* rtlanal.c (nonzero_bits1): Likewise.
(num_sign_bit_copies1): Likewise.
* rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
(reg_num_sign_bit_copies_general): Likewise.
* rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
(reg_nonzero_bits_general): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251501 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c
gcc/rtl.h
gcc/rtlanal.c
gcc/rtlhooks-def.h
gcc/rtlhooks.c