aboutsummaryrefslogtreecommitdiff
path: root/gcc/machmode.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-08-30 11:20:19 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-08-30 11:20:19 +0000
commit16d2200070f49ed71053b81699e37bd539a0ee69 (patch)
treec89eef6816d81c30d7695888167b3345c11aae26 /gcc/machmode.h
parentf4f6058097d99812ee3eda98d09c23fccdc7ba94 (diff)
downloadgcc-16d2200070f49ed71053b81699e37bd539a0ee69.zip
gcc-16d2200070f49ed71053b81699e37bd539a0ee69.tar.gz
gcc-16d2200070f49ed71053b81699e37bd539a0ee69.tar.bz2
[71/77] Use opt_scalar_mode for mode iterators
This patch uses opt_scalar_mode when iterating over scalar modes. 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * coretypes.h (opt_scalar_mode): New typedef. * gdbhooks.py (build_pretty_printers): Handle it. * machmode.h (mode_iterator::get_2xwider): Add overload for opt_mode<T>. * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating over scalar modes. * expr.c (convert_mode_scalar): Likewise. * omp-low.c (omp_clause_aligned_alignment): Likewise. * optabs.c (expand_float): Likewise. (expand_fix): Likewise. * tree-vect-stmts.c (vectorizable_conversion): Likewise. gcc/c-family/ * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode for the mode iterator. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251522
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r--gcc/machmode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 4586d62..5d84a2e 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -835,6 +835,13 @@ namespace mode_iterator
/* Set mode iterator *ITER to the mode that is two times wider than the
current one, if such a mode exists. */
+ template<typename T>
+ inline void
+ get_2xwider (opt_mode<T> *iter)
+ {
+ *iter = GET_MODE_2XWIDER_MODE (iter->require ());
+ }
+
inline void
get_2xwider (machine_mode *iter)
{