From 695da53448dcc40e1e5db83bcf14d16217ffbd4a Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 13 Jan 2018 17:57:25 +0000 Subject: Give the target more control over ARRAY_TYPE modes So far we've used integer modes for LD[234] and ST[234] arrays. That doesn't scale well to SVE, since the sizes aren't fixed at compile time (and even if they were, we wouldn't want integers to be so wide). This patch lets the target use double-, triple- and quadruple-length vectors instead. 2018-01-13 Richard Sandiford Alan Hayward David Sherwood gcc/ * target.def (array_mode): New target hook. * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook. * doc/tm.texi: Regenerate. * hooks.h (hook_optmode_mode_uhwi_none): Declare. * hooks.c (hook_optmode_mode_uhwi_none): New function. * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use targetm.array_mode. * stor-layout.c (mode_for_array): Likewise. Support polynomial type sizes. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r256617 --- gcc/hooks.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/hooks.h') diff --git a/gcc/hooks.h b/gcc/hooks.h index d6c894f..8caedd4 100644 --- a/gcc/hooks.h +++ b/gcc/hooks.h @@ -124,4 +124,7 @@ extern const char *hook_constcharptr_const_rtx_insn_null (const rtx_insn *); extern const char *hook_constcharptr_const_tree_const_tree_null (const_tree, const_tree); extern const char *hook_constcharptr_int_const_tree_null (int, const_tree); extern const char *hook_constcharptr_int_const_tree_const_tree_null (int, const_tree, const_tree); + +extern opt_machine_mode hook_optmode_mode_uhwi_none (machine_mode, + unsigned HOST_WIDE_INT); #endif -- cgit v1.1