[12/77] Use opt_scalar_float_mode when iterating over float modes
commit2b8f2d97726a19e43ef8c7c914544eefc46d0d1b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:09:48 +0000 (30 11:09 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:09:48 +0000 (30 11:09 +0000)
tree7e03f2635a9fe715b2717872ffe1afc0cc1cfde8
parent99d671f4d8a7a4e8338a949b4a95c44ba0dfc782
[12/77] Use opt_scalar_float_mode when iterating over float modes

This means that we know when accessing the modes that the size is
a compile-time constant, even for SVE.  It also enables stricter
type safety in later patches.

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

gcc/
* machmode.h (mode_iterator::start): Provide overload for opt_modes.
(mode_iterator::iterate_p): Likewise.
(mode_iterator::get_wider): Likewise.
* expr.c (init_expr_target): Use opt_scalar_float_mode.

gcc/ada/
* gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
(fp_size_to_prec): Likewise.

gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.

gcc/fortran/
* trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
and FOR_EACH_MODE_IN_CLASS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251464 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c
gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/expr.c
gcc/fortran/ChangeLog
gcc/fortran/trans-types.c
gcc/machmode.h