diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2018-11-13 14:11:46 +0000 |
---|---|---|
committer | Andre Vieira <avieira@gcc.gnu.org> | 2018-11-13 14:11:46 +0000 |
commit | ca31798e7bf8f87d78ff1ee66c120b135a1b2ebc (patch) | |
tree | 6b158aa560b82ddda522c92fe49e7d2bffb256c8 /gcc/tree-vectorizer.h | |
parent | be2b68e4cd63e50f4dd5fca247b9a919fb0013a0 (diff) | |
download | gcc-ca31798e7bf8f87d78ff1ee66c120b135a1b2ebc.zip gcc-ca31798e7bf8f87d78ff1ee66c120b135a1b2ebc.tar.gz gcc-ca31798e7bf8f87d78ff1ee66c120b135a1b2ebc.tar.bz2 |
[PATCH][GCC] Make DR_TARGET_ALIGNMENT compile time variable
This patch enables targets to describe DR_TARGET_ALIGNMENT as a compile-time
variable. It does so by turning the variable into a 'poly_uint64'.
gcc/ChangeLog:
2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/aarch64/aarch64.c
(aarch64_vectorize_preferred_vector_alignment): Change return type to
poly_uint64.
(aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
alignment being a poly int.
* doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
return type to poly_uint64.
* target.def (default_preferred_vector_alignment): Likewise.
* targhooks.c (default_preferred_vector_alignment): Likewise.
* targhooks.h (default_preferred_vector_alignment): Likewise.
* tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
(vect_compute_data_ref_alignment): Adapt to vector alignment being a
poly int.
(vect_update_misalignment_for_peel): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_find_same_alignment_drs): Likewise.
(vect_duplicate_ssa_name_ptr_info): Likewise.
(vect_setup_realignment): Likewise.
(vect_can_force_dr_alignment_p): Change alignment parameter type to
poly_uint64.
* tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
mask with a compile time variable vector alignment.
(vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
int.
(vect_do_peeling): Exit early if vector alignment is not constant.
* tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
a poly int.
(vectorizable_store): Likewise.
(vectorizable_load): Likweise.
* tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
poly_uint64.
(vect_known_alignment_in_bytes): Adapt to vector alignment being a
poly int.
(vect_can_force_dr_alignment_p): Change alignment parameter type to
poly_uint64.
From-SVN: r266072
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index e66f28b..7f21622 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -775,7 +775,7 @@ struct dr_vec_info { int misalignment; /* The byte alignment that we'd ideally like the reference to have, and the value that misalignment is measured against. */ - int target_alignment; + poly_uint64 target_alignment; /* If true the alignment of base_decl needs to be increased. */ bool base_misaligned; tree base_decl; @@ -1281,7 +1281,7 @@ vect_known_alignment_in_bytes (dr_vec_info *dr_info) if (DR_MISALIGNMENT (dr_info) == DR_MISALIGNMENT_UNKNOWN) return TYPE_ALIGN_UNIT (TREE_TYPE (DR_REF (dr_info->dr))); if (DR_MISALIGNMENT (dr_info) == 0) - return DR_TARGET_ALIGNMENT (dr_info); + return known_alignment (DR_TARGET_ALIGNMENT (dr_info)); return DR_MISALIGNMENT (dr_info) & -DR_MISALIGNMENT (dr_info); } @@ -1503,7 +1503,7 @@ extern opt_result vect_get_vector_types_for_stmt (stmt_vec_info, tree *, extern opt_tree vect_get_mask_type_for_stmt (stmt_vec_info); /* In tree-vect-data-refs.c. */ -extern bool vect_can_force_dr_alignment_p (const_tree, unsigned int); +extern bool vect_can_force_dr_alignment_p (const_tree, poly_uint64); extern enum dr_alignment_support vect_supportable_dr_alignment (dr_vec_info *, bool); extern tree vect_get_smallest_scalar_type (stmt_vec_info, HOST_WIDE_INT *, |