summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-29 21:55:47 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-29 21:55:47 +0000
commit5c205353eae8e4bed899635efd29ae9322e246d4 (patch)
treee755e23b8c84859e189788b0f53371eb79533cf9 /gcc/tree-vect-analyze.c
parent55cb441751477d3a0cfba330de34109fe9b07ec7 (diff)
downloadgcc-5c205353eae8e4bed899635efd29ae9322e246d4.tar.gz
* tree-vectorizer.h (DR_MISALIGNMENT): Cast aux to integer.
(SET_DR_MISALIGNMENT): New. * tree-vect-analyze.c (vect_compute_data_ref_alignment, vect_update_misalignment_for_peel, vect_enhance_data_refs_alignment): Use SET_DR_MISALIGNMENT. * tree-predcom.c (split_data_refs_to_components): Cast dr->aux from pointer. * tree-data-ref.c (create_data_ref, compute_all_dependences, find_loop_nest): Export. * tree-data-ref.h (struct data_reference): Change aux field to pointer. (create_data_ref, compute_all_dependences, find_loop_nest): Declare. * tree-ssa-loop-prefetch.c: Include tree-data-ref.h. (L1_CACHE_SIZE_BYTES, L2_CACHE_SIZE_BYTES, NONTEMPORAL_FRACTION): New macros. (struct mem_ref): Add field reuse_distance. (find_or_create_group, record_ref): Use XNEW instead of xcalloc. Initialize reuse_distance field. (issue_prefetch_ref): Select temporality of prefetch according to reuse_distance. (volume_of_references, volume_of_dist_vector, add_subscript_strides, self_reuse_distance, determine_loop_nest_reuse): New functions. (loop_prefetch_arrays): Call determine_loop_nest_reuse. (tree_ssa_prefetch_arrays): Dump L2 cache size. * Makefile.in (tree-ssa-loop-prefetch.o): Add TREE_DATA_REF_H dependency. * gcc.dg/tree-ssa/prefetch-6.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 6636cfd2758..647d98f82a6 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -1128,7 +1128,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
fprintf (vect_dump, "vect_compute_data_ref_alignment:");
/* Initialize misalignment to unknown. */
- DR_MISALIGNMENT (dr) = -1;
+ SET_DR_MISALIGNMENT (dr, -1);
misalign = DR_INIT (dr);
aligned_to = DR_ALIGNED_TO (dr);
@@ -1198,7 +1198,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
return false;
}
- DR_MISALIGNMENT (dr) = TREE_INT_CST_LOW (misalign);
+ SET_DR_MISALIGNMENT (dr, TREE_INT_CST_LOW (misalign));
if (vect_print_dump_info (REPORT_DETAILS))
{
@@ -1267,21 +1267,23 @@ vect_update_misalignment_for_peel (struct data_reference *dr,
continue;
gcc_assert (DR_MISALIGNMENT (dr) / dr_size ==
DR_MISALIGNMENT (dr_peel) / dr_peel_size);
- DR_MISALIGNMENT (dr) = 0;
+ SET_DR_MISALIGNMENT (dr, 0);
return;
}
if (known_alignment_for_access_p (dr)
&& known_alignment_for_access_p (dr_peel))
{
- DR_MISALIGNMENT (dr) += npeel * dr_size;
- DR_MISALIGNMENT (dr) %= UNITS_PER_SIMD_WORD;
+ int misal = DR_MISALIGNMENT (dr);
+ misal += npeel * dr_size;
+ misal %= UNITS_PER_SIMD_WORD;
+ SET_DR_MISALIGNMENT (dr, misal);
return;
}
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "Setting misalignment to -1.");
- DR_MISALIGNMENT (dr) = -1;
+ SET_DR_MISALIGNMENT (dr, -1);
}
@@ -1577,7 +1579,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
save_misalignment = DR_MISALIGNMENT (dr);
vect_update_misalignment_for_peel (dr, dr0, npeel);
supportable_dr_alignment = vect_supportable_dr_alignment (dr);
- DR_MISALIGNMENT (dr) = save_misalignment;
+ SET_DR_MISALIGNMENT (dr, save_misalignment);
if (!supportable_dr_alignment)
{
@@ -1601,7 +1603,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
LOOP_VINFO_UNALIGNED_DR (loop_vinfo) = dr0;
LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) = DR_MISALIGNMENT (dr0);
- DR_MISALIGNMENT (dr0) = 0;
+ SET_DR_MISALIGNMENT (dr0, 0);
if (vect_print_dump_info (REPORT_ALIGNMENT))
fprintf (vect_dump, "Alignment of access forced using peeling.");
@@ -1702,7 +1704,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
{
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
dr = STMT_VINFO_DATA_REF (stmt_info);
- DR_MISALIGNMENT (dr) = 0;
+ SET_DR_MISALIGNMENT (dr, 0);
if (vect_print_dump_info (REPORT_ALIGNMENT))
fprintf (vect_dump, "Alignment of access forced using versioning.");
}