[12/77] Use opt_scalar_float_mode when iterating over float modes
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 30 Aug 2017 11:09:48 +0000 (11:09 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 30 Aug 2017 11:09:48 +0000 (11:09 +0000)
commit5c20c4af29da29d2bb74b1fdf3c116f564431878
tree7e03f2635a9fe715b2717872ffe1afc0cc1cfde8
parent857c7b46875bdcf9d889543baad54977034d57ef
[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.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251464
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