Give the target more control over ARRAY_TYPE modes
commit30d26b1cadb152b462086b79c16cbdd276690541
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Jan 2018 17:57:25 +0000 (13 17:57 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Jan 2018 17:57:25 +0000 (13 17:57 +0000)
tree653ae8366d4a3351466cfc904a7623b71b73a233
parenta90455f4475f9dcdba4fe14ef1ab70c726ae06ed
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  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256617 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/hooks.c
gcc/hooks.h
gcc/stor-layout.c
gcc/target.def
gcc/tree-vect-data-refs.c