summaryrefslogtreecommitdiff
path: root/gcc/target.def
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-30 14:39:32 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-30 14:39:32 +0000
commit482a44fac34add269597316ca15f2907f4361ef4 (patch)
treedc5799dbc1af4d3d79e2dbe5b4f3915b5afa6052 /gcc/target.def
parenteff9fe284fb7b0844e3f247f409dafa7c1e48592 (diff)
downloadgcc-482a44fac34add269597316ca15f2907f4361ef4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.def')
-rw-r--r--gcc/target.def10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/target.def b/gcc/target.def
index bdbf68e7c53..5ac6d48681b 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -1664,6 +1664,16 @@ DEFHOOK
bool, (enum machine_mode mode),
hook_bool_mode_false)
+DEFHOOK
+(vector_alignment,
+ "This hook can be used to define the alignment for a vector of type\n\
+@var{type}, in order to comply with a platform ABI. The default is to\n\
+require natural alignment for vector types. The alignment returned by\n\
+this hook must be a power-of-two multiple of the default alignment of\n\
+the vector element type.",
+ HOST_WIDE_INT, (const_tree type),
+ default_vector_alignment)
+
/* True if we should try to use a scalar mode to represent an array,
overriding the usual MAX_FIXED_MODE limit. */
DEFHOOK