diff options
author | Ulrich Weigand <ulrich.weigand@linaro.org> | 2012-07-30 14:39:32 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2012-07-30 14:39:32 +0000 |
commit | 5aea1e76a80c9c5770692ece18100b9383cbab3a (patch) | |
tree | dc5799dbc1af4d3d79e2dbe5b4f3915b5afa6052 /gcc/doc/tm.texi | |
parent | 4c340b5dfa736102f1fc50f3a4f2ba685708c7ff (diff) | |
download | gcc-5aea1e76a80c9c5770692ece18100b9383cbab3a.zip gcc-5aea1e76a80c9c5770692ece18100b9383cbab3a.tar.gz gcc-5aea1e76a80c9c5770692ece18100b9383cbab3a.tar.bz2 |
target.def (vector_alignment): New target hook.
ChangeLog:
* target.def (vector_alignment): New target hook.
* doc/tm.texi.in (TARGET_VECTOR_ALIGNMENT): Document new hook.
* doc/tm.texi: Regenerate.
* targhooks.c (default_vector_alignment): New function.
* targhooks.h (default_vector_alignment): Add prototype.
* stor-layout.c (layout_type): Use targetm.vector_alignment.
* config/arm/arm.c (arm_vector_alignment): New function.
(TARGET_VECTOR_ALIGNMENT): Define.
* tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use
vector type alignment instead of size.
* tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Use
element type size directly instead of computing it from alignment.
Fix variable naming and comment.
testsuite/ChangeLog:
* lib/target-supports.exp
(check_effective_target_vect_natural_alignment): New function.
* gcc.dg/align-2.c: Only run on targets with natural alignment
of vector types.
* gcc.dg/vect/slp-25.c: Adjust tests for targets without natural
alignment of vector types.
Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>
From-SVN: r189974
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index b419a71..0f8d43a 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1107,6 +1107,14 @@ make it all fit in fewer cache lines. If the value of this macro has a type, it should be an unsigned type. @end defmac +@deftypefn {Target Hook} HOST_WIDE_INT TARGET_VECTOR_ALIGNMENT (const_tree @var{type}) +This hook can be used to define the alignment for a vector of type +@var{type}, in order to comply with a platform ABI. The default is to +require natural alignment for vector types. The alignment returned by +this hook must be a power-of-two multiple of the default alignment of +the vector element type. +@end deftypefn + @defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align}) If defined, a C expression to compute the alignment for stack slot. @var{type} is the data type, @var{mode} is the widest mode available, |